R: Comma's in data?

2008-03-10 Thread Nanni Claudio
Hi Jason, Commas are not special characters inside a varchar type of a mysql table. What you have to watch is not to break strings. That usually happens when you use the same type of quotes ,as a value of the string, of the ones used to enclose the string itself. For instance: insert into

MYSQL FUNCTIONS

2008-03-10 Thread Krishna Chandra Prajapati
Hi All, While i was going through mysql reference manual. I saw that A query cannot be cached if it contains any of the functions shown below BENCHMARK() CONNECTION_ID() CONVERT_TZ() CURDATE() CURRENT_DATE() CURRENT_TIME()

Select Statement

2008-03-10 Thread Velen
Hi, I need to write up a select statement something like: Select a.supcode,a.code,b.desc,sum(c.qty),c.dept where a.supcode=b.supcode and a.code=c.code and a.code=b.code and c.dept between $tring1 and $tring2. group by supcode This is fine but the problem is that there is duplicate supcode

Re: MYSQL FUNCTIONS

2008-03-10 Thread Sebastian Mendel
Krishna Chandra Prajapati schrieb: Hi All, While i was going through mysql reference manual. I saw that A query cannot be cached if it contains any of the functions shown below BENCHMARK() CONNECTION_ID() CONVERT_TZ() CURDATE() CURRENT_DATE()

Re: Select Statement

2008-03-10 Thread Sebastian Mendel
Velen schrieb: Hi, I need to write up a select statement something like: Select a.supcode,a.code,b.desc,sum(c.qty),c.dept where a.supcode=b.supcode and a.code=c.code and a.code=b.code and c.dept between $tring1 and $tring2. group by supcode This is fine but the problem is that there is

Re: Server Instance Setup Error

2008-03-10 Thread Vidal Garza
Craig Huffstetler escribió: Greetings again Andrew, That error message is usually when you try to login to MySQL by whatever means (the Windows install Wizard may be attempting this in the final steps upon starting up? But it should not be starting up as root...). Can you complete the

No database selected error when running mysql_tzinfo_to_sql

2008-03-10 Thread dpgirago
I'm getting an error trying to run this command: root mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ | mysql -u xxx -p xxx ERROR 1046 (3D000) at line 1: No database selected Funny thing is I know I've run this on 2 other servers with identical software without issue, however I see that

Re: No database selected error when running mysql_tzinfo_to_sql

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 11:07 AM, [EMAIL PROTECTED] wrote: I'm getting an error trying to run this command: root mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ | mysql -u xxx -p xxx ERROR 1046 (3D000) at line 1: No database selected mysql -D mysql -u xxx -p mysql_tzinfo_to_sql

Re: MYSQL FUNCTIONS

2008-03-10 Thread Tim McDaniel
On Mon, 10 Mar 2008, Krishna Chandra Prajapati [EMAIL PROTECTED] wrote: While i was going through mysql reference manual. I saw that A query cannot be cached if it contains any of the functions shown below ... NOW() On my production server, the following query is being used. select * from

Re: No database selected error when running mysql_tzinfo_to_sql

2008-03-10 Thread Tim McDaniel
On Mon, 10 Mar 2008, [EMAIL PROTECTED] wrote: I'm getting an error trying to run this command: root mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ | mysql -u xxx -p xxx ERROR 1046 (3D000) at line 1: No database selected The MySQL 5.0 manual explains mysql_tzinfo_to_sql at

Re: No database selected error when running mysql_tzinfo_to_sql

2008-03-10 Thread Tim McDaniel
On Mon, 10 Mar 2008, Daniel Brown [EMAIL PROTECTED] wrote: mysql -D mysql -u xxx -p mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ The -D flag selects the database `mysql`, which is where the time zone information belongs. The redirect reads from the file (which, in this case, is

Re: No database selected error when running mysql_tzinfo_to_sql

2008-03-10 Thread dpgirago
On Mon, Mar 10, 2008 at 11:07 AM, [EMAIL PROTECTED] wrote: I'm getting an error trying to run this command: root mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ | mysql -u xxx -p xxx ERROR 1046 (3D000) at line 1: No database selected mysql -D mysql -u xxx -p mysql_tzinfo_to_sql

Re: No database selected error when running mysql_tzinfo_to_sql

2008-03-10 Thread dpgirago
Its example line is mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql There's a trailing mysql, which specifies the mysql database. It also specifies all zoneinfo, not America/. Thanks, Tim. I totally missed the trailing mysql. Duh! --David.

Re: No database selected error when running mysql_tzinfo_to_sql

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 11:36 AM, Tim McDaniel [EMAIL PROTECTED] wrote: On Mon, 10 Mar 2008, Daniel Brown [EMAIL PROTECTED] wrote: mysql -D mysql -u xxx -p mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ The -D flag selects the database `mysql`, which is where the time zone

Re: No database selected error when running mysql_tzinfo_to_sql

2008-03-10 Thread Tim McDaniel
On Mon, 10 Mar 2008, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: wrote: The command worked with this syntax: root mysql_tzinfo_to_sql /usr/share/zoneinfo/America/ | mysql -D mysql -u xxx -p xxx It's easy to know that the command ran without error, but I don't know how to test it to know that

Re: Select Statement

2008-03-10 Thread Velen
In fact my sql statement is like this: select b.customer_name Customer,a.sale_id DocNo,a.sale_date Date,a.prod_code Product,a.quantity Quantity,c.cost_price Cost,a.price Price, c.prod_description,a.store,d.payMode from sale_trans a,customer_master b,prod_master c,saletrans_cons d where

Re: Select Statement

2008-03-10 Thread Peter Brawley
Velen, My problem is that it is displaying a.sale_id but different customer_name as it is taking sale_id from d and matching cust_code with b Any non-aggregate SELECTed value that does not have a 1:1 relationship with your GROUP BY column will show arbitrary results, so the first thing to get

Re: Select Statement

2008-03-10 Thread Baron Schwartz
On Mon, Mar 10, 2008 at 1:38 PM, Peter Brawley [EMAIL PROTECTED] wrote: Velen, My problem is that it is displaying a.sale_id but different customer_name as it is taking sale_id from d and matching cust_code with b Any non-aggregate SELECTed value that does not have a 1:1 relationship

Updating rows in a table with the information from the same table

2008-03-10 Thread MariSok
I have a products table with historical price information. Some records are missing price information. I added another field - closest_price, to be populated for records with 0 price. This would be price values from the same table, same product with non-zero price with earliest date. So my

Migrate HUGE Database

2008-03-10 Thread Terry Babbey
Hello, I have a huge database that I would like to migrate from a server running 4.0.16 to a server running the Windows version 5.0.45. The database is approximately 3,500,000 records. I get timeout errors using PHPMyAdmin to export the data. Does anyone have any suggestions for how I can do

MySQL 6.0.4 Alpha has been released ! (part 1 of 2)

2008-03-10 Thread Joerg Bruehe
Dear MySQL users, MySQL 6.0.4-alpha, a new version of the MySQL database system including the Falcon transactional storage engine (now at beta stage), has been released. The main page for MySQL 6.0 is at: http://www.mysql.com/mysql60/ If you are new to the Falcon storage engine and need

MySQL 6.0.4 Alpha has been released ! (part 2 of 2)

2008-03-10 Thread Joerg Bruehe
Dear MySQL users, MySQL 6.0.4-alpha, a new version of the MySQL database system including the Falcon transactional storage engine (now at beta stage), has been released. The main page for MySQL 6.0 is at: http://www.mysql.com/mysql60/ If you are new to the Falcon storage engine and need

Re: Migrate HUGE Database

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 2:29 PM, Terry Babbey [EMAIL PROTECTED] wrote: Hello, I have a huge database that I would like to migrate from a server running 4.0.16 to a server running the Windows version 5.0.45. The database is approximately 3,500,000 records. I get timeout errors using

Re: Migrate HUGE Database

2008-03-10 Thread Rob Wultsch
On Mon, Mar 10, 2008 at 11:29 AM, Terry Babbey [EMAIL PROTECTED] wrote: Hello, I have a huge database that I would like to migrate from a server running 4.0.16 to a server running the Windows version 5.0.45. The database is approximately 3,500,000 records. I get timeout errors using

Re: Migrate HUGE Database

2008-03-10 Thread D Hill
On Mon, 10 Mar 2008 at 14:29 -0400, [EMAIL PROTECTED] confabulated: Hello, I have a huge database that I would like to migrate from a server running 4.0.16 to a server running the Windows version 5.0.45. The database is approximately 3,500,000 records. I get timeout errors using PHPMyAdmin to

RE: Migrate HUGE Database

2008-03-10 Thread Rolando Edwards
You can take this a step further nohup mysqldump -hhost of Linux Machine -uusername -ppassword --all-databases --routines --triggers | mysql -hhost of Windows Machine -A This will pipe all the data directly to Windows machine without an intermittent file. Even if you logout of Linux, it should

Copying tables

2008-03-10 Thread skills2go
Hi Folks I'm trying to copy a database table form one database to another on a different server. Is it possible through myphpadmin, or do I need software? If software, do you know of any good programs to do this? Bob -- View this message in context:

Re: Copying tables

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 2:58 PM, skills2go [EMAIL PROTECTED] wrote: Hi Folks I'm trying to copy a database table form one database to another on a different server. Is it possible through myphpadmin, or do I need software? If software, do you know of any good programs to do this?

Re: Migrate HUGE Database

2008-03-10 Thread Tim McDaniel
On Mon, 10 Mar 2008, Daniel Brown [EMAIL PROTECTED] wrote: mysqldump -u username -p database_name database_name.sql To explain: -u usernameReplace 'username' with the database username. -p This signifies that you'll use a password

Re: Copying tables

2008-03-10 Thread Tim McDaniel
On Mon, 10 Mar 2008, Daniel Brown [EMAIL PROTECTED] wrote: On Mon, Mar 10, 2008 at 2:58 PM, skills2go [EMAIL PROTECTED] wrote: I'm trying to copy a database table form one database to another on a different server. Is it possible through myphpadmin, or do I need software? If software, do

Re: Copying tables

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 3:26 PM, Tim McDaniel [EMAIL PROTECTED] wrote: On Mon, 10 Mar 2008, Daniel Brown [EMAIL PROTECTED] wrote: The same question just received an excellent answer from Rolando Edwards about ten minutes ago. Check the archive here:

Re: Migrate HUGE Database

2008-03-10 Thread Warren Young
Tim McDaniel wrote: I was a bit puzzled seeing -p database_name, ... How very inconsistent and obnoxious. It's best to think of -p as never taking an argument, always asking interactively. Many operating systems will let a processes access the command line parameters of another process,

Re: Migrate HUGE Database

2008-03-10 Thread Phil
mysqldump from the commandline. You are most likely running into php execution time limits using phpmyadmin OR you could probably just copying the underlying files, .frm,MYI and MYD I've successfully done that with myisam databases going from version 4 - 5 on tables exceeding 50M rows. Not sure

RE: Migrate HUGE Database

2008-03-10 Thread Terry Babbey
Thanks to all for the quick replies. Yes, the mysqldump worked perfectly. Boy do I feel like a newbie now! If I use the method below, will that transfer the mysql admin database too with the user information? Thanks, Terry -Original Message- From: Rolando Edwards [mailto:[EMAIL

Re: Migrate HUGE Database

2008-03-10 Thread Daniel Brown
On Mon, Mar 10, 2008 at 4:05 PM, Terry Babbey [EMAIL PROTECTED] wrote: Thanks to all for the quick replies. Yes, the mysqldump worked perfectly. Boy do I feel like a newbie now! If I use the method below, will that transfer the mysql admin database too with the user information?

Re: Migrate HUGE Database

2008-03-10 Thread Tim McDaniel
On Mon, 10 Mar 2008, Daniel Brown [EMAIL PROTECTED] wrote: On Mon, Mar 10, 2008 at 4:05 PM, Terry Babbey [EMAIL PROTECTED] wrote: If I use the method below, will that transfer the mysql admin database too with the user information? nohup mysqldump -hhost of Linux Machine -uusername

ordering my regex

2008-03-10 Thread Patrick Aljord
Hi all, I'm doing a select * from comments where c.content REGEXP 'http://[^i].*' and I would like to sort the urls found by repetition of the same urls. As an example if I get 3 records with http://google.com url in the content and two with http://mysql.com I would get the first the 3 comments

how: many-to-many with LEFT JOIN

2008-03-10 Thread dr_pompeii
Hello guys before to a last doom requeriment, i used to work with this type of relation ArticuloNoAuto (english ArticleNoCar like MotorCycle or Motor) and CabeceraComprobanteVenta (like a header of Receipt of some sell SalesReceiptHeader) so 1 CabeceraComprobanteVenta can [b]sell/contain

Re: MySQL 6.0.4 Alpha has been released ! (part 1 of 2)

2008-03-10 Thread Antony T Curtis
Missing feature not mentioned... Falcon works on PowerPC and UltraSparc. Regards, Antony On 10 Mar, 2008, at 11:53, Joerg Bruehe wrote: Dear MySQL users, MySQL 6.0.4-alpha, a new version of the MySQL database system including the Falcon transactional storage engine (now at beta stage),