LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Exporting MYSQL results into a external files (https://www.linuxquestions.org/questions/linux-general-1/exporting-mysql-results-into-a-external-files-49060/)

saravanan1979 03-10-2003 12:31 AM

Exporting MYSQL results into a external files
 
Hello,
Can anyone please tell me how to import the results of MYSQl query to a external file..I have tried

mysql> MYSQL query tee <external file>

but this does not work

Saravanan

AltF4 03-10-2003 06:34 AM

try this:

mysql <myquery.sql >results.log

BenCarlisle 03-10-2003 11:12 AM

Also, try using the -B switch for actual usable results. This will write out the data as a tab-delimited data file instead of drawing the columns and tables.

cheers

saravanan1979 03-10-2003 10:14 PM

All the above are fine but my requirement is to export the result f a mysql query into an external files say a text file or a Excel Sheet or a HTML file..I am able to import the query from an external file and execute them..using source <filename> but tee is not working for me..

buttersoft 11-12-2003 03:19 PM

mySQL redirecting query result to a .txt file!

Search for this in the software forum and your answer is found!


All times are GMT -5. The time now is 08:36 PM.