Before alter Field name in table, Things Need to check

2010-01-05 Thread bharani kumar
Hi For example , Student_TBL Student_id Student_Name Student_regNo , Am going to Alter the StudentregNo To StudentRegister_No , Am not sure who are all used this field , that any of the views depend this StudentRegister_No , How to check it , Is there any function Do this, Thanks

Exporting the result of a Query into excel

2010-01-05 Thread ishaq gbola
Hi all, I would like to know if there is a tool or command in mySQL that allows one to export the result of query into excel formart

Re: Exporting the result of a Query into excel

2010-01-05 Thread Jay Ess
ishaq gbola wrote: Hi all, I would like to know if there is a tool or command in mySQL that allows one to export the result of query into excel formart select * from table into outfile thefile.txt; That can be imported into excel using CSV and using TAB as separator.

Re: Exporting the result of a Query into excel

2010-01-05 Thread Jim Lyons
You can use the --xml option to the mysql command to get xnl output. You can also get a tab-delimited output file that can be read into Excel (this is what I usually do). To get a tab-delimited file, you can use the --tab option of mysqldump or start up the mysql program with the -sss option and

Re: Exporting the result of a Query into excel

2010-01-05 Thread ishaq gbola
Thanks a lot for that, but where does this file get saved in and how can i copy it to my local host if the database is on a remote server --- On Tue, 5/1/10, Jay Ess li...@netrogenic.com wrote: From: Jay Ess li...@netrogenic.com Subject: Re: Exporting the result of a Query into excel To:

Re: Exporting the result of a Query into excel

2010-01-05 Thread Jay Ess
ishaq gbola wrote: Thanks a lot for that, but where does this file get saved in and how can i copy it to my local host if the database is on a remote server If you don't specify the absolute location it can be find in DATADIR/DatabaseName/. And after you located the file you have a

Re: Exporting the result of a Query into excel

2010-01-05 Thread sureshkumarilu
Hi What is the OS you are using on the remote and local server. Is there a mysql client on local server? Thanks Suresh Kuna Sent from BlackBerry® on Airtel -Original Message- From: ishaq gbola ishaq...@yahoo.co.uk Date: Tue, 5 Jan 2010 13:31:59 To: mysql@lists.mysql.com Subject: Re:

Re: Exporting the result of a Query into excel

2010-01-05 Thread ishaq gbola
Am running windows on my local host and Redhat linux on the remote server, I have no mysql client on local host. TAC for the NMS using the database adviced me not to use a msqlclient for it, that it could break the database??? --- On Tue, 5/1/10, sureshkumar...@gmail.com

Re: Exporting the result of a Query into excel

2010-01-05 Thread ishaq gbola
As test i tried this and I got the result below mysql show tables into outfile trial.txt     - ; ERROR 1064: You have an error in your SQL syntax.  Check the manual that corresp  onds to your MySQL server version for the right syntax to use near 'into outfile

Re: Exporting the result of a Query into excel

2010-01-05 Thread sureshkumarilu
Ok. In windows, Use winscp tool, connect to the server and copy the file to local machine and import it in excel. Thanks Suresh Kuna Sent from BlackBerry® on Airtel -Original Message- From: ishaq gbola ishaq...@yahoo.co.uk Date: Tue, 5 Jan 2010 13:42:20 To: mysql@lists.mysql.com

Re: Exporting the result of a Query into excel

2010-01-05 Thread sureshkumarilu
We have to use outfile with select stmt, not with show. Suresh Kuna Sent from BlackBerry® on Airtel -Original Message- From: ishaq gbola ishaq...@yahoo.co.uk Date: Tue, 5 Jan 2010 13:45:44 To: mysql@lists.mysql.com Subject: Re: Exporting the result of a Query into excel As test i tried

Re: Join with OR-condition and Indexes

2010-01-05 Thread Shawn Green
Tobias Schultze wrote: Hello, I'm working on an application for my bachelor thesis. I'm having a performance problem with a SQL-Query in MySQL5. I hoped someone can easily enlighten me in this issue. The schema: CREATE TABLE IF NOT EXISTS `athletes` ( `id` int(11) NOT NULL

Re: Join with OR-condition and Indexes

2010-01-05 Thread Michael Dykman
What it comes down to is that MySQL can only use 1 index per table per query. The moment your query includes OR examining different columns, a full table scan is the only option. One typical way to implement this is to use UNIONS as Mr. Green suggested: SELECT aid, count(*) FROM ( SELECT a.id

Realistic settings for [myisamchk] in my.cnf

2010-01-05 Thread Hank
I'm looking to optimize the myisamchk settings for some table rebuilds I need to do. I'm running CentOS 5 and MySQL 5.1 in a VMWare VM with 4 vCPUs and 4GB of memory. All the examples I can find online look like they are several years old, and just copied from someone else's config. I think

Re: Exporting the result of a Query into excel

2010-01-05 Thread Jim Lyons
A command to convert the table mytab in database mydb into a tab-delimited file mytab.txt might be: mysql -e'select * from mydb.mytab' -sss mytab.txt The -sss is necessary to remove all the formatting stuff that you normally have in the output of a select statement. An alternative, if you

Re: Exporting the result of a Query into excel

2010-01-05 Thread Michael Dykman
TAC for the NMS using the database adviced me not to use a msqlclient for it, that it could break the database??? You are being given a false argument. If the application which connects to MySQL is running on that windows box then there already is a MySQL client on that machine, albeit a

MySQL 5.1 does not work on Mac OS X 10.5 Leopard and Power PC

2010-01-05 Thread Moishe Weiss
I would like to note to the MySQL development team that there is no download available for MySQL 5 Community Edition for a Mac Power PC and OS X 10.5. There is a MySQL 4/PPC/OSX 10.4 download and there is a MySQL 5/Intel/OSX 10.5 download. I tried the MySQL 5.1 /x86-64/OSX 10.5 download and

Re: Exporting the result of a Query into excel

2010-01-05 Thread Carsten Pedersen
Is there any particular reason not to use the MySQL ODBC driver to import the data directly into Excel? / Carsten Jim Lyons skrev: A command to convert the table mytab in database mydb into a tab-delimited file mytab.txt might be: mysql -e'select * from mydb.mytab' -sss mytab.txt The -sss

Re: Exporting the result of a Query into excel

2010-01-05 Thread Lawrence Sorrillo
Carsten: Can you demonstrate this? ~Lawrence Carsten Pedersen wrote: Is there any particular reason not to use the MySQL ODBC driver to import the data directly into Excel? / Carsten Jim Lyons skrev: A command to convert the table mytab in database mydb into a tab-delimited file

Re: Exporting the result of a Query into excel

2010-01-05 Thread Jim Lyons
Doesn't that depend on how often you want to do it? If it's a one-time thing or an occasional thing, it's easier to just dump the table into a tab-delimited file. If it's something you want to do on a regular basis, ODBC is a way you might prefer to go. But it also would require you to have the

RE: Exporting the result of a Query into excel

2010-01-05 Thread Jason Trebilcock
-Original Message- From: ishaq gbola [mailto:ishaq...@yahoo.co.uk] Sent: Tuesday, January 05, 2010 7:18 AM To: mysql@lists.mysql.com Subject: Exporting the result of a Query into excel Hi all, I would like to know if there is a tool or command in mySQL that allows one to

Re: Before alter Field name in table, Things Need to check

2010-01-05 Thread Anand kumar
you can take the help from information_schema . --Anand On Tue, Jan 5, 2010 at 4:01 PM, bharani kumar bharanikumariyer...@gmail.com wrote: Hi For example , Student_TBL Student_id Student_Name Student_regNo , Am going to Alter the StudentregNo To StudentRegister_No , Am not sure who