Handling of NULL values when importing data from SQL Server BCP files
In the category of terrible, horrible, no good, very bad (but at least documented) software behavior, I bumped into this today: http://bugs.mysql.com/bug.php?id=14770 where the LOAD DATA INFILE command does not respect the default value of a column if no value is supplied in the file. Instead, it assigns zero to numeric columns, empty string to character columns, etc., per http://dev.mysql.com/doc/refman/5.0/en/load-data.html This is awful! I mean, it's documented behavior and all, but it's still just bloody awful! Has anyone else found a graceful solution to this problem? The thing is, my data files may have real zeros in numeric columns, whereas NULL of course is used to indicate an unknown value. When I migrate this application from SQL Server to MySQL in the next couple of weeks, suddenly I'll have a lot of zeros where I previously had NULLs. Dan
Re: ~BCP for mysql~
Try Using Select into outfile More Info : http://dev.mysql.com/doc/refman/5.0/en/select.html --Praj On Wed, 22 Mar 2006 12:59:44 +0530 Mohammed Abdul Azeem [EMAIL PROTECTED] wrote: Hi, Can we any use bcp to perform bulk copy for MYSQL as in SYBASE ? If not, is there any other tool which can do the same operation. I need to perform a bcp out from Mysql and then bcp in to Sybase. Please help me out regarding the same. Thanks in advance, Abdul. This email has been Scanned for Viruses! www.newbreak.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
~BCP for mysql~
Hi, Can we any use bcp to perform bulk copy for MYSQL as in SYBASE ? If not, is there any other tool which can do the same operation. I need to perform a bcp out from Mysql and then bcp in to Sybase. Please help me out regarding the same. Thanks in advance, Abdul. This email has been Scanned for Viruses! www.newbreak.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: ~BCP for mysql~
Try SELECT INTO OUTFILE... Here's the MySQL documentation on that: http://dev.mysql.com/doc/ refman/5.0/en/select.html Good luck! On Mar 22, 2006, at 1:29 AM, Mohammed Abdul Azeem wrote: Hi, Can we any use bcp to perform bulk copy for MYSQL as in SYBASE ? If not, is there any other tool which can do the same operation. I need to perform a bcp out from Mysql and then bcp in to Sybase. Please help me out regarding the same. Thanks in advance, Abdul. This email has been Scanned for Viruses! www.newbreak.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] Douglas Sims [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: ~BCP for mysql~
Hi, You can try to use the command select into outfile. thanks, ehrwin At 03:29 PM 3/22/2006, Mohammed Abdul Azeem wrote: Hi, Can we any use bcp to perform bulk copy for MYSQL as in SYBASE ? If not, is there any other tool which can do the same operation. I need to perform a bcp out from Mysql and then bcp in to Sybase. Please help me out regarding the same. Thanks in advance, Abdul. This email has been Scanned for Viruses! www.newbreak.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] Ehrwin C. Mina Chikka Phils. Inc. A CMMI LEVEL 5, AND A ISO 9001:2000; ISO 15000:2002; ISO 17799:2002 CERTIFIED COMPANY This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you must not copy this message or attachment or disclose the contents to any other person. If you have received this transmission in error, please notify the sender immediately and delete the message and any attachment from your system. Chikka does not accept liability for any omissions or errors in this message which may arise as a result of E-Mail-transmission or for damages resulting from any unauthorized changes of the content of this message and any attachment thereto. Chikka does not guarantee that this message is free of viruses and does not accept liability for any damages caused by any virus transmitted therewith. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Import Sybase Ase bcp text file with date type format fields
Hi, I have to import some data in Mysql from a Sybase bulk copy (bcp) text files, and I have some problems with date type format fields. The sybase db has datetime fields and in the dump file the date format is like this: Mar 3 1999 12:00:00:000AM I have created a table with the same structure but when I perform load data ... query command Mysql import only this '-00-00 00:00:00' zero value. Thanks in advance. Danilo Happy Mysql User - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Import Sybase Ase bcp text file with date type format fields
The mysql datetime will have to be '1999-03-03 12:00:00' or 1999030312 Maurizio Danilo wrote: Hi, I have to import some data in Mysql from a Sybase bulk copy (bcp) text files, and I have some problems with date type format fields. The sybase db has datetime fields and in the dump file the date format is like this: Mar 3 1999 12:00:00:000AM I have created a table with the same structure but when I perform load data ... query command Mysql import only this '-00-00 00:00:00' zero value. Thanks in advance. Danilo Happy Mysql User - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Mysql's equivalent of SQL Loader or BCP/DTS??
Im looking for info on Mysql's Bulk Data Loading Utility? Does it even have one? Does it just use Perl's DBI? Any syntax would be greatly appreciated... Thanks, DK David Kramer Software Developer Reflect.com Direct: 415.369.4856 Cell: 650.302.7889 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Mysql's equivalent of SQL Loader or BCP/DTS??
In the last episode (Jul 31), David Kramer said: Im looking for info on Mysql's Bulk Data Loading Utility? Does it even have one? Does it just use Perl's DBI? Any syntax would be greatly appreciated... Check out http://www.mysql.com/doc/L/O/LOAD_DATA.html . It's a stripped-down version of Oracle's SQL*Loader syntax, but useable for most purposes. -- Dan Nelson [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
BCP
I am using C:\ BCP dbname.dbo.tblname out tblname.txt -S srvrname -U sa P sapwd -c -t \t -r \n to create a text file from a sqlserver table . Th text file shows a tab after every field except the last field. How can i get it to put a tab even after the last field. Help is appreciated, regards, Harpreet _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
[OT] Re: BCP
On Tuesday 26 March 2002 2:56 pm, Harpreet Kaur wrote: I am using C:\ BCP dbname.dbo.tblname out tblname.txt -S srvrname -U sa P sapwd -c -t \t -r \n to create a text file from a sqlserver table . Th text file shows a tab after every field except the last field. How can i get it to put a tab even after the last field. This does not seem to be relevant to MySQL. The best way of doing this would be to use perl. Should be a fairly simple perl script, just replace all \n with \t\n - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
BCP
Hi, I am doing some development testing in PHP and MySQL. I have already bulk copied some data from a Sybase table into a comma sep file. My question.: How can I get this data into MySql so that I can test the speed. I am working on Win95 for now but intend porting everything to Sun Sol by the end of the year. For now I need a dos version or equivelent of BCP.EXE that will work with MySql. Is there something out there? Please help. I am hopeing to get started tonight. Hopefully be Sunday I can have done a decent load test. Will let you know the results if you ask. Thanks - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php