?
Solved

SQL tranferring data to a simple excel sheet

Posted on 2011-02-21
9
Medium Priority
?
239 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Suggested Courses

777 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