Sponsored Content
Full Discussion: Export table of 50 columns
Top Forums Shell Programming and Scripting Export table of 50 columns Post 302637719 by zaxxon on Wednesday 9th of May 2012 07:59:09 AM
Old 05-09-2012
One of the first hits when entering "mysql export csv" in Google brought this:
MySQL :: Re: Export to CSV

When importing to Excel, you will have to specify the same file delimeter that you have chosen when exporting.
Additionally it would be good to read up on the SELECT-statement.

Last edited by zaxxon; 05-09-2012 at 09:41 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

export table from oracle database

i would like to export a particular table in my oracle database installed in a hpux box. i would like to determine the filesize of the output before performing these action so i can assess if my harddisk can still handle it. thanks as usuall :rolleyes: (1 Reply)
Discussion started by: inquirer
1 Replies

2. Shell Programming and Scripting

help for writing shell script to export table data

Hi All, I need to write a shell script(ksh) to take the tables backup in oracle(exporting tables data). The tables list is not static, and those are selecting through dynamic sql query. Can any body help how to write this shell script. Thanks, (3 Replies)
Discussion started by: sankarg
3 Replies

3. Shell Programming and Scripting

Export a HTML table to Xcel

Hello All, I have a perl script that prints a HMTL table. I want to convert this data into a report and this want to export this information into Excel. How can I do this? Regards, garric (3 Replies)
Discussion started by: garric
3 Replies

4. Shell Programming and Scripting

Problem in scheduling an Export of a table

Hi, I am facing a problem while scheduling an export of a table using cron job. I have written a simple export command inside a shell script test.sh like echo started exp schemaname/temp1234 file= /test/d.dmp tables=per_st log= /test/d.log echo ended I tried scheduling it through... (6 Replies)
Discussion started by: beautifulmind
6 Replies

5. Shell Programming and Scripting

How to export table data to xml file?

Hi , I would like to get some suggestion from the experts. My requirement is to export oracle table data as an xml file. Any unix/linux tools, scripts available? Regards, (2 Replies)
Discussion started by: LinuxLearner
2 Replies

6. Shell Programming and Scripting

Shell script to export data from Oracle table .

Hi, I want to write a shell script which will export data from oracle table . I don't want to save that data . I want the queries . Right now i am right clicking on the table and clicking on export as to my desktop . Please let me know if any one have any idea . (2 Replies)
Discussion started by: honey26
2 Replies

7. Shell Programming and Scripting

Export table and restart from last table

Hello all, Thank you in advance for reading my post and helping me.. Scenario: I have 50 tables whose names are in a file export.sql, i use the below command to export all these tables one by one cat export.sql|while read tn do echo "export to $tn.del of del select from... (7 Replies)
Discussion started by: family_guy
7 Replies

8. Shell Programming and Scripting

How to export hive table data to a file on local UNIX?

Hi All , I am stuck on the below situation.I have a table called "test" which are created on hive.I need to export the data from hive to a file(test.txt) on local unix system.I have tried the below command ,but its giving the exception . hive -e "select * from test " > /home/user/test.txt ; ... (1 Reply)
Discussion started by: STCET22
1 Replies

9. UNIX for Advanced & Expert Users

How can i export entries from table into a variable and parse them?

Hi, I need to export some entries from a table, from a specific column and then redirect them into a file. I used sql plus, in order to fetch the entries and i put them in one variable. When i am running the script it stuck at a point and does not move further. I did something like: ... (4 Replies)
Discussion started by: cookie2
4 Replies

10. UNIX for Beginners Questions & Answers

Export HTML table

HI , I have a HTML tables as below. It has 2 tables ,I want to extract the second table . Please help me in doing it. <html> <body> <b><br>Running Date: </b>11-JAN-2019 03:07</br> <h2> Schema mapping and info </h2> <BR><TABLE width="100%" class="x1h" cellpadding="1"... (3 Replies)
Discussion started by: deepti01
3 Replies
Class::DBI::mysql(3pm)					User Contributed Perl Documentation				    Class::DBI::mysql(3pm)

NAME
Class::DBI::mysql - Extensions to Class::DBI for MySQL SYNOPSIS
package Film; use base 'Class::DBI::mysql'; __PACKAGE__->set_db('Main', 'dbi:mysql:dbname', 'user', 'password'); __PACKAGE__->set_up_table("film"); __PACKAGE__->autoinflate(dates => 'Time::Piece'); # Somewhere else ... my $type = $class->column_type('column_name'); my @allowed = $class->enum_vals('column_name'); my $tonights_viewing = Film->retrieve_random; DESCRIPTION
This is an extension to Class::DBI, containing several functions and optimisations for the MySQL database. Instead of setting Class::DBI as your base class, use this instead. METHODS
set_up_table __PACKAGE__->set_up_table("table_name"); Traditionally, to use Class::DBI, you have to set up the columns: __PACKAGE__->columns(All => qw/list of columns/); __PACKAGE__->columns(Primary => 'column_name'); Whilst this allows for more flexibility if you're going to arrange your columns into a variety of groupings, sometimes you just want to create the 'all columns' list. Well, this information is really simple to extract from MySQL itself, so why not just use that? This call will extract the list of all the columns, and the primary key and set them up for you. It will die horribly if the table contains no primary key, or has a composite primary key. autoinflate __PACKAGE__->autoinflate(column_type => 'Inflation::Class'); __PACKAGE__->autoinflate(timestamp => 'Time::Piece'); __PACKAGE__->autoinflate(dates => 'Time::Piece'); This will automatically set up has_a() relationships for all columns of the specified type to the given class. We currently assume that all classess passed will be able to inflate and deflate without needing extra has_a arguments, with the example of Time::Piece objects, which we deal with using Time::Piece::mysql (which you'll have to have installed!). The special type 'dates' will autoinflate all columns of type date, datetime or timestamp. create_table $class->create_table(q{ name VARCHAR(40) NOT NULL PRIMARY KEY, rank VARCHAR(20) NOT NULL DEFAULT 'Private', serial INTEGER NOT NULL }); This creates the table for the class, with the given schema. If the table already exists we do nothing. A typical use would be: Music::CD->table('cd'); Music::CD->create_table(q{ cdid MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, artist MEDIUMINT UNSIGNED NOT NULL, title VARCHAR(255), year YEAR, INDEX (artist), INDEX (title) }); Music::CD->set_up_table; drop_table $class->drop_table; Drops the table for this class, if it exists. column_type my $type = $class->column_type('column_name'); This returns the 'type' of this table (VARCHAR(20), BIGINT, etc.) enum_vals my @allowed = $class->enum_vals('column_name'); This returns a list of the allowable values for an ENUM column. retrieve_random my $film = Film->retrieve_random; This will select a random row from the database, and return you the relevant object. (MySQL 3.23 and higher only, at this point) SEE ALSO
Class::DBI. MySQL (http://www.mysql.com/) AUTHOR
Tony Bowden BUGS and QUERIES Please direct all correspondence regarding this module to: bug-Class-DBI-mysql@rt.cpan.org COPYRIGHT AND LICENSE
Copyright (C) 2001-2005 Tony Bowden. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. perl v5.10.0 2005-09-03 Class::DBI::mysql(3pm)
All times are GMT -4. The time now is 04:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy