INSERT into select ... ON DUPLICATE KEY??

2006-09-03 Thread Chris Jones
I am tying to dupilicate a set of records changing only one field. That field is part of a UNIQUE key. So far I copy the records into themselves and keep the same number of records: insert ignore into user_projects select * from user_projects where user_id=[EMAIL PROTECTED] and

Re: Is there a way to load non-native Date type with LOAD DATA

2006-09-03 Thread Chris Jones
Use a command line tool to change the date. I am only familiar with perl and it would be a very short script to change to -MM-DD. At 10:48 PM 9/2/2006, David Perron wrote: I have a pretty large file with a Date column in the format M/D/. Is there a way to either change the Date data

Re: Is there a way to load non-native Date type with LOAD DATA

2006-09-03 Thread Chris W
David Perron wrote: I have a pretty large file with a Date column in the format M/D/. Is there a way to either change the Date data type in the table or a method to indicate the date format in the LOAD DATA statement in order to handle this? in VI the following should work depending

Re: Is there a way to load non-native Date type with LOAD DATA

2006-09-03 Thread Brad Jahnke
I have a pretty large file with a Date column in the format M/D/. Is there a way to either change the Date data type in the table or a method to indicate the date format in the LOAD DATA statement in order to handle this? If you are using MySQL 5.0.3 or greater, you should be able to

DBD/DBI datetime insert

2006-09-03 Thread Hal Wigoda
anyone have the code that will insert the current time into a datetime field in a table while using perl DBI/DBD::mysql? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: DBD/DBI datetime insert

2006-09-03 Thread Paul DuBois
At 7:23 PM -0500 9/3/06, Hal Wigoda wrote: anyone have the code that will insert the current time into a datetime field in a table while using perl DBI/DBD::mysql? Something like this: $dbh-do(INSERT INTO t (col_name) VALUES(NOW())); -- Paul DuBois, MySQL Documentation Team Madison,

Re: DBD/DBI datetime insert

2006-09-03 Thread Hal Wigoda
that looks very good. On Sep 3, 2006, at 7:26 PM, Paul DuBois wrote: At 7:23 PM -0500 9/3/06, Hal Wigoda wrote: anyone have the code that will insert the current time into a datetime field in a table while using perl DBI/DBD::mysql? Something like this: $dbh-do(INSERT INTO t (col_name)

RE: problem with InnoDB

2006-09-03 Thread prasad.ramisetti
Hi Chris, Thanks for your response. Actually there is some requirement, where I need to know the number of rows that I will get for my queries before actually executing the query. Could you please suggest some way for this. Thanks Prasad -Original Message- From: Chris [mailto:[EMAIL

Re: problem with InnoDB

2006-09-03 Thread Dan Nelson
In the last episode (Sep 04), [EMAIL PROTECTED] said: Actually there is some requirement, where I need to know the number of rows that I will get for my queries before actually executing the query. Could you please suggest some way for this. Your best bet is to create an index on the smallest