Can you store data from a database to excel file without using any tool? How?

Questions by Cool_Guy007   answers by Cool_Guy007

Showing Answers 1 - 4 of 4 Answers

aphun

  • Sep 17th, 2012
 

Yes you can export data from a database into .csv, which in turn can be opened in excel or open office.

Note: Ive only tested this from a mysql database and then opening the csv in openoffice, but I dont see any reason why it would not work a Microsft SQL database. run the following query on a table on SQL..

Code
  1.  

  2. SELECT * INTO OUTFILE /tmp/customer.csv

  3.   FIELDS TERMINATED BY ,

  4.   OPTIONALLY ENCLOSED BY "

  5.  LINES TERMINATED BY

  6.  

  7. FROM customer

  8. ;

  Was this answer useful?  Yes

A

  • Sep 19th, 2012
 

Yes you can

  Was this answer useful?  Yes

Waqas Ahmed

  • Oct 6th, 2012
 

Here is the query to export data into csv file.

Code
  1. SELECT *

  2. INTO OUTFILE /tmp/products.csv

  3. FIELDS TERMINATED BY ,

  4. ENCLOSED BY "

  5. ESCAPED BY

  6. LINES TERMINATED BY

  7. FROM products



  Was this answer useful?  Yes

avinash

  • Jan 21st, 2013
 

Yes to store excel file in data base just you have to save the excel file in .CSV(comma delimiter) format and then insert the value as usually in database.....

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions