Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL tranferring data to a simple excel sheet

Posted on 2011-02-21
9
Medium Priority
?
241 Views
Last Modified: 2012-06-27
I need to "visualise" some SQL data in Excel - I've no clue how to do it can anyone help?

Cheers!
0
Comment
Question by:Jason210
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 85

Assisted Solution

by:Rory Archibald
Rory Archibald earned 1000 total points
ID: 34942485
What do you mean by visualise? If you want to import it, then you can do that.
0
 
LVL 11

Author Comment

by:Jason210
ID: 34942575
I want to export it to an existing Excel file.
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 34942603
Assuming you have an ODBC driver for MySQL you can set up a data query in the worksheet to extract the data directly. Exact instructions will depend on which version of Excel.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Author Comment

by:Jason210
ID: 34942672
Well I can choose the format of the Excel file. Let's say I saved the Excel file as an Excel 97 - 2003 Worksheet?

0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 34942693
No, the instructions differ according to the version of Excel you are running, not according to the file format, since it's a question of which menu commands to use in Excel.
0
 
LVL 11

Author Comment

by:Jason210
ID: 34942700
An OBCD driver? You mean I have to actually install that?
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 34942718
Yes, if you don't already have one. You may be able to do an export from MySQL directly too - that's not my field. ;)
0
 
LVL 14

Accepted Solution

by:
Scott Madeira earned 1000 total points
ID: 34955226
If you can run a select query on the table then you can do something like this to get a CSV file called result.txt:

SELECT a,b,a+b INTO OUTFILE '/tmp/result.txt'
  FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
  LINES TERMINATED BY '\n'
  FROM test_table;


This is an example from the MySQL manual:

http://dev.mysql.com/doc/refman/5.0/en/select.html

After you get the file you can open it in Excel.
0
 
LVL 11

Author Comment

by:Jason210
ID: 35099079
OK cheers. Sorry for my delay in accepting.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question