I'm guessing you are talking about extracting data from a MySQL database and putting it into a spreadsheet?
In which case you'd start with a call to mysql:
You'd then need to parse this data into a csv style format (piping the mysql into awk is a pretty easy way to get this done, but mysql might even have a csv output format option if you explore it's help pages)
Lastly, have a look round for csv to xls converters (or just stick with .csv format as excel will happily read that)
---------- Post updated at 04:48 AM ---------- Previous update was at 12:12 AM ----------
Thanks for your reply............it was helpful.
But I have another query like how to fetch only particular data from database (MYSQL)(for ex: user and msg) for every 2hrs and convert into an .xls format.
How to write script for the below query?
Thanks,
Shobana
Last edited by Franklin52; 02-19-2014 at 07:33 AM..
Reason: Please use code tags
Hi,
I have built out a new virtual production environment (VMWare, HA enabled, VMotion... all the bells & whistles) using RHEL5 VM's.
I have got another ESX host that I plan to use as a pre-prod environment. To save some costs on RH subs I was thinking about installing this environment... (5 Replies)
Dear Linux Experts,
On my windows 7 desktop with the help of Vmware workstation (Version 7.1),
created virtual machine and installed Centos 5.7 successfully using ISO image.
Query : Is this possible to upgrade the Centos 5.7 using Centos 5.8 ISO image to Centos version 5.8?.. if yes kindly... (2 Replies)
Hi,
I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database.
For instance:
USER CITY
--------- ----------
A CITY_A
B CITY_B
C ... (2 Replies)
Hi,
I have a requirement as below which needs to be done viz UNIX shell script
(1) I have to connect to an Oracle database
(2) Exexute "SELECT field_status from table 1" query on one of the tables.
(3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
I would like to use the result of a query in another query. How do I redirect/add the output to another variable?
$result = odbc_exec($connect, $query);
while ($row = odbc_fetch_array($result)) {
echo $row,"\n";
}
odbc_close($connect);
?>
This will output hostnames:
host1... (0 Replies)