Re: Load Data Problem

2002-04-03 Thread Jon Barker
Hi, I'm having a problem when using Load Data where the single and double quotes in the text file are getting nuked. It appears that the escape character is not being respected but I'm not sure why. It is also knocking out characters near the quotes. Your single and double quotes come out

Re: load data infile question

2002-03-27 Thread Buding Chen
Hi, Harpreet: You should use MySQL C API mysql_escape_string(...) to convert that description field into a legal SQL string before load data infile. B.R. budingc - Original Message - From: Harpreet Kaur [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 27, 2002 4:41

Re: load data infile question

2002-03-26 Thread Paul DuBois
At 20:41 + 3/26/02, Harpreet Kaur wrote: I want to transfer data from a table in sql server to mysql. I use C:\ BCP dbname.dbo.tblname out tblname.txt -S srvrname -U sa –P sapwd -c -t \t -r \n to write the data to a text file and then use load data infile ‘/var/www/html/tblname.txt' into

Re: Load Data Command

2002-03-21 Thread Mark Horton
If the table has a unique key then add the REPLACE keyword. This will update the columns with new values if the key already exists and add the row if it doesnt. --Mark Michael Kaiser wrote: Using the following inserts data from a text file into a particular MySQL table: LOAD DATA LOCAL

Re: [Re: LOAD DATA LOCAL INFILE in Alpha 3.23.49]]

2002-03-12 Thread Michael Widenius
Hi! Thomas == Thomas Birchmire [EMAIL PROTECTED] writes: Thomas I tried putting --local-infile in my server script and local-infile in the Thomas /etc/my.cnf file. I also placed a number or logging cammands in the startup Thomas script hoping to catch lower level messages. There appears to

RE: LOAD DATA INFILE and how to ignore garbage lines at end ofload file?

2002-03-05 Thread Baines, Dominic
16:33 To: Richard Bolen; MySQL Mailing List (E-mail) Subject: Re: LOAD DATA INFILE and how to ignore garbage lines at end ofload file? At 10:58 -0500 3/4/02, Richard Bolen wrote: I'm exporting data from Oracle and importing it into MySQL. The problem is Oracle puts garbage lines at the end

Re: LOAD DATA LOCAL INFILE in Alpha 3.23.49]

2002-03-05 Thread Sinisa Milivojevic
Thomas Birchmire writes: I have the same problem using Linux RedHat 7.2. Just what do I have to configure my binary MySQL : Ver 8.23 Distrib 3.23.49a, for pc-linux-gnu on i686? The rest of MySQL works as advertised. Regards Tom Birchmire loca-infile is not a variable.

Re: [Re: LOAD DATA LOCAL INFILE in Alpha 3.23.49]]

2002-03-05 Thread Thomas Birchmire
I tried putting --local-infile in my server script and local-infile in the /etc/my.cnf file. I also placed a number or logging cammands in the startup script hoping to catch lower level messages. There appears to be little effect on anything. Regards, Tom Birchmire -- script and log stuff

Re: [Re: LOAD DATA LOCAL INFILE in Alpha 3.23.49]]

2002-03-05 Thread Sinisa Milivojevic
Thomas Birchmire writes: I tried putting --local-infile in my server script and local-infile in the /etc/my.cnf file. I also placed a number or logging cammands in the startup script hoping to catch lower level messages. There appears to be little effect on anything. Regards, Tom Birchmire

Re: LOAD DATA INFILE and how to ignore garbage lines at end ofload file?

2002-03-04 Thread Paul DuBois
At 10:58 -0500 3/4/02, Richard Bolen wrote: I'm exporting data from Oracle and importing it into MySQL. The problem is Oracle puts garbage lines at the end of it's output files. As you've noted, the problem is Oracle. If you're using Unix, you could use tail to see how many of these lines

RE: LOAD DATA INFILE and how to ignore garbage lines at end ofload file?

2002-03-04 Thread Richard Bolen
: Re: LOAD DATA INFILE and how to ignore garbage lines at end ofload file? At 10:58 -0500 3/4/02, Richard Bolen wrote: I'm exporting data from Oracle and importing it into MySQL. The problem is Oracle puts garbage lines at the end of it's output files. As you've noted, the problem is Oracle

Re: LOAD DATA LOCAL INFILE in Alpha 3.23.49

2002-03-04 Thread Michael Widenius
Hi! Sinisa == Sinisa Milivojevic [EMAIL PROTECTED] writes: Sinisa [EMAIL PROTECTED] writes: Description: LOAD DATA LOCAL INFILE ... leads to 'The used command is not allowed with this MySQL version' This happens regardless of whether I have a local-infile = 1 in my /etc/my.cnf.

Re: LOAD DATA INFILE and how to ignore garbage lines at end of load file?

2002-03-04 Thread David Turner
Is this a true export? Because I've never had garbage lines in my files. Dave On Mon, Mar 04, 2002 at 10:33:14AM -0600, Paul DuBois wrote: At 10:58 -0500 3/4/02, Richard Bolen wrote: I'm exporting data from Oracle and importing it into MySQL. The problem is Oracle puts garbage lines at the

Re: LOAD DATA LOCAL INFILE in Alpha 3.23.49]

2002-03-04 Thread Thomas Birchmire
I have the same problem using Linux RedHat 7.2. Just what do I have to configure my binary MySQL : Ver 8.23 Distrib 3.23.49a, for pc-linux-gnu on i686? The rest of MySQL works as advertised. Regards Tom Birchmire Michael Widenius [EMAIL PROTECTED] wrote: Hi! Sinisa == Sinisa

Re: LOAD DATA LOCAL INFILE in Alpha 3.23.49

2002-03-01 Thread Sinisa Milivojevic
Rob Steele writes: Thanks. I don't think this feature is working as the documentation says it should. Section 4.2.4 of the manual says: By default all MySQL clients and libraries are compiled with | --enable-local-infile|, to be compatible with MySQL 3.23.48 and before. That

Re: load data error

2002-02-27 Thread Sommai Fongnamthip
sorry for my fault: I forgot $ (dollar sign) before sql variable. Sommai At 09:58 28/2/2002 +0700, Sommai Fongnamthip wrote: Hi, Please tell me why this mysql in php error: sql = LOAD DATA LOCAL INFILE \/home/httpds/htdocs/srg/data/tct.csv\ INTO TABLE tct_temp FIELDS TERMINATED BY

Re: LOAD DATA INFILE sets blanks to 0 instead of NULL

2002-02-26 Thread Paul DuBois
At 12:43 -0500 2/26/02, Philip Mak wrote: I made an Excel spreadsheet containing grades of students in my class, like this: (name) (email) (assignment 1 grade)(assignment 2 grade) For when a student did not submit an assignment, I just left the field blank. I'm trying to import the

Re: LOAD DATA INFILE sets blanks to 0 instead of NULL

2002-02-26 Thread Philip Mak
On Tue, Feb 26, 2002 at 12:03:25PM -0600, Paul DuBois wrote: it set the integer columns to 0 if they were blank in the text file. How can I make it set those to NULL instead? You'll have to preprocess the file to convert empty fields to \N. Damn, that's what I thought. I guess I'll have to

Re: LOAD DATA INFILE sets blanks to 0 instead of NULL

2002-02-26 Thread Paul DuBois
At 13:08 -0500 2/26/02, Philip Mak wrote: On Tue, Feb 26, 2002 at 12:03:25PM -0600, Paul DuBois wrote: it set the integer columns to 0 if they were blank in the text file. How can I make it set those to NULL instead? You'll have to preprocess the file to convert empty fields to \N. Damn,

RE: LOAD DATA LOCAL INFILE (Only loads 20,000 or 41,000 Records)

2002-02-21 Thread Johnny Withers
This worked for me: create table tblZips( id int unsigned not null auto_increment primary key, city char(24) not null default '', state char(2) not null default '', zip char(5) not null default '' ) Type=InnoDB; Saved CSV file as a UNIX (instad of DOS format file) LOAD DATA

Re: load data local ... security issue

2002-02-06 Thread David Phillips
But you could already read any file that the web server can read, if you can execute scripts which are run as the webserver. Only way to prevent that is suEXEC. How is this specific to MySQL? 1) Webserver must be able to read HTML files of every WebUsers 2) MySQL functions are called with

Re: LOAD DATA INFILE - Duplicate entry '' for key...

2002-01-25 Thread DL Neil
- From: Bogdan Stancescu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 25 January 2002 00:22 Subject: Re: LOAD DATA INFILE - Duplicate entry '' for key... Just for the record, found the glitch: somehow, somebody on the way decided to change LF's into CRLF's (I remotely dumped the data and e

Re: LOAD DATA INFILE - Duplicate entry '' for key...

2002-01-24 Thread Bogdan Stancescu
Just for the record, found the glitch: somehow, somebody on the way decided to change LF's into CRLF's (I remotely dumped the data and e-mailed it locally where I test the setup process, so maybe the mail agent?). I just had to replace 0x0d0a's into 0x0a's in a hex editor and everything works

RE: LOAD DATA INFILE Problem

2002-01-19 Thread johnlucas-Arluna
Sorry, my fault, realised the file I was writing for VB was cocking it up. I was adding chr(13) at the end, but the FileSystemObject write method seemed to be putting the carriage return in too, so MYSQL didn't get the newline character. I changed to use the Print command in VB instead just

Re: load data local infile

2002-01-04 Thread Douglas Potter
Yes the data is consistent firstname, lastname, address, city... The data is sent to me in eight different files every day. I want to import the data into a mysql database and set a field that is not included in the txt file. The files are sent to me already organized by region and would like

RE: load data local infile

2002-01-03 Thread Quentin Bennett
Hi, Not quite sure what you mean, but you can use load data infile 'file' into table mytab (col1, col3, col2) to specify in to which columns the data should go. HTH Quentin -Original Message- From: Douglas Potter [mailto:[EMAIL PROTECTED]] Sent: Friday, 4 January 2002 12:27 p.m.

RE: Load data infile

2001-12-04 Thread john
remove your line termination and it will not look for this non-existing data and run through the whole file. john -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 10:11 PM To: [EMAIL PROTECTED] Subject: Load data infile Be struggling

Re: Load data infile

2001-12-04 Thread Mike(mickalo)Blezien
Thanks john, After some further checking, the files that I was trying to load back into the db where sent to me from a MAC, and had some strange C/R's in it, causing the file be formatted improperly! After fixing that, all the files loaded into the db fine! :) thx's On Tue, 4 Dec 2001

Re: Load Data Infile

2001-11-26 Thread Elm Gysel
http://www.mysql.com/doc/L/O/LOAD_DATA.html Elm database,sql,query,table Hi guys, Can any one told me - with my great appreciate - how to load a data from txt file into a specific column? Thanks. Hytham Shehab _ This message

Re: Load Data with extra field

2001-11-12 Thread Carl Troein
M. A. Alves writes: mysql database $!#$#%$ I know the feeling. :-P On Sun, 11 Nov 2001, Michael Conley wrote: . . . even though the text files that I am importing don't have the customer number of the person who submitted it, if I know the customer number . . . Where from do

RE: Load data infile

2001-10-31 Thread Rick Emery
Use optionally: mysql LOAD DATA INFILE '/home/sql/data.csv' INTO TABLE csvdata FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\' LINES TERMINATED BY '\n'; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 9:33 AM To: [EMAIL

Re: Load data infile

2001-10-31 Thread sql
Hi I didn't see any difference between using optionally or not. Any solutions to make the two that fails work? (see test case below) Using 3.23.41. Thanks test.csv: Record 1,some data,Works Record 2,some data,Works Record 3,some 'data',Works Record 4,some data,Works Record 5,somedata,Fails

RE: Load data infile

2001-10-31 Thread Joe Kaiping
PROTECTED]] Sent: Wednesday, October 31, 2001 12:48 PM To: [EMAIL PROTECTED] Subject: Re: Load data infile Hi I didn't see any difference between using optionally or not. Any solutions to make the two that fails work? (see test case below) Using 3.23.41. Thanks test.csv: Record 1,some

RE: Re: Load data infile

2001-10-31 Thread Christopher Book
I didn't see any difference between using optionally or not. Any solutions to make the two that fails work? (see test case below) Using 3.23.41. That's a problem with your input data. You can't have the character that you're using to surround the fields within the field,

Re: Load data infile

2001-10-31 Thread Paul DuBois
At 2:47 PM -0500 10/31/01, [EMAIL PROTECTED] wrote: Hi I didn't see any difference between using optionally or not. Any solutions to make the two that fails work? (see test case below) Using 3.23.41. Thanks The problem is that your CSV file isn't legal CSV. You'll need to tell your

Re: Load data infile

2001-10-31 Thread Paul DuBois
At 10:32 AM -0500 10/31/01, [EMAIL PROTECTED] wrote: Hi I'm working on importing csv datafile returns Warnings, after carefully checking data I noticed that there are double quotes () inside the records. mysql LOAD DATA INFILE '/home/sql/data.csv' INTO TABLE csvdata FIELDS TERMINATED BY ','

Re: load data infile problems

2001-10-23 Thread Carl Troein
Chris Book writes: My actual data has represented as , so I need to set it up this way. I would prefer to work with the files the way they are now rather than re-export my data a different way, since that machine is inconvenient right now. I can export data using the same params, and

RE: load data infile problems

2001-10-22 Thread Moshe Gurvich
i had similar problem until used line delimiter different than default \n try this: load data local infile 'file.txt' into table mytable fields optionally enclosed by '' escaped by '' terminated by ',' LINES TERMINATED BY '-= aNy we1Rd cHar 0r Str1Ng =-' :) -Original Message-

Re: load data infile problems

2001-10-22 Thread Carl Troein
Chris Book writes: load data local infile 'file.txt' into table mytable fields optionally enclosed by '' escaped by '' terminated by ',' I'm not sure how mysql handles the case where the escape character is the same as the field enclosing character, and I can see a problem here if you have a

Re: LOAD DATA INFILE - split one field into two??

2001-09-06 Thread Marjolein Katsma
That would be a tough one - you'd first have to make sure every single record has no more than two words in that field. there's no guarantee that a field name would actually always contain only two names, or even two names at all. When I get stuffy, I spell my name as A. Marjolein Katsma -

Re: LOAD DATA INFILE - split one field into two??

2001-09-06 Thread Paul DuBois
I have a tab delimited file from a spreadsheet that has a field Name (includes first and last name). I am importing the file into a table that has firstName and lastName as seperate fields. Is there a way to split the field from the text file Name into two different fields in the database,

Re: LOAD DATA into multiple tables?

2001-09-05 Thread Sinisa Milivojevic
Brad Stockdale writes: Hello all, I'm new to the list... Been using MySQL for various things for a year now, but have never ran into the following situation... I have a flat text file that I have exported from FileMaker Pro. I want to import that into MySQL, but there's a

Re: LOAD DATA into multiple tables?

2001-09-04 Thread Brad Stockdale
Hello all, I'm new to the list... Been using MySQL for various things for a year now, but have never ran into the following situation... I have a flat text file that I have exported from FileMaker Pro. I want to import that into MySQL, but there's a catch... There are two tables I am

Re: LOAD DATA into multiple tables?

2001-09-04 Thread Brad Stockdale
Hello all, I'm new to the list... Been using MySQL for various things for a year now, but have never ran into the following situation... I have a flat text file that I have exported from FileMaker Pro. I want to import that into MySQL, but there's a catch... There are two tables I am

Re: LOAD DATA INFILE Question

2001-09-04 Thread Philip Mak
On Tue, 4 Sep 2001, Curtis Spencer wrote: I have a text file with around 25 fields but I only want 5 of them. They are not the first 5 fields that I want. Is there a way to skip fields using LOAD DATA INFILE so I don't have to build a 25 field table and then cut it down? Read the manual

Re: LOAD DATA INFILE Question

2001-09-04 Thread Paul DuBois
At 12:45 PM -0700 9/4/01, Curtis Spencer wrote: I have a text file with around 25 fields but I only want 5 of them. They are not the first 5 fields that I want. Is there a way to skip fields using LOAD DATA INFILE so I don't have to build a 25 field table and then cut it down? Thanks, Curtis

Re: load data infile....

2001-08-25 Thread Rene Tegel
Rudy, there is an explanation to this behaviour: on escaped data you could un-escape almost everything, one can escape almost any character if wanted.. .. so \\ gets \ and \* gets *, \% gets % and \N gets... N. mysql select \A\B\C\J\N; +-+ |ABCJN| +-+ |ABCJN| +-+ 1 row in set

Re: LOAD DATA INFILE performance testing

2001-08-08 Thread Michael Widenius
Hi! Sinisa == Sinisa Milivojevic [EMAIL PROTECTED] writes: Sinisa Jeff Tanner writes: I running a test on mysql to test its performance of doing a bulk insert into a table using LOAD DATA INFILE. The table is simple: CREAT TABLE test ( valueCHAR(32) NOT NULL PRIMARY KEY )

Re: LOAD DATA INFILE performance testing

2001-08-06 Thread Sinisa Milivojevic
Jeff Tanner writes: I running a test on mysql to test its performance of doing a bulk insert into a table using LOAD DATA INFILE. The table is simple: CREAT TABLE test ( valueCHAR(32) NOT NULL PRIMARY KEY ) The test is simple: a) clear table b) time

Re: LOAD DATA INFILE performance testing

2001-08-06 Thread Tim Bunce
DELAY_KEY_WRITE=1 Tim. On Mon, Aug 06, 2001 at 07:36:17AM -0700, Jeff Tanner wrote: I running a test on mysql to test its performance of doing a bulk insert into a table using LOAD DATA INFILE. The table is simple: CREAT TABLE test ( valueCHAR(32) NOT NULL PRIMARY KEY )

RE: LOAD DATA INFILE performance testing

2001-08-06 Thread Jeff Tanner
Tanner Cc: '[EMAIL PROTECTED]' Subject: Re: LOAD DATA INFILE performance testing DELAY_KEY_WRITE=1 Tim. On Mon, Aug 06, 2001 at 07:36:17AM -0700, Jeff Tanner wrote: I running a test on mysql to test its performance of doing a bulk insert into a table using LOAD DATA INFILE. The table

RE: LOAD DATA INFILE performance testing

2001-08-06 Thread Jeff Tanner
PROTECTED]] Sent: Monday, August 06, 2001 8:33 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: LOAD DATA INFILE performance testing Jeff Tanner writes: I running a test on mysql to test its performance of doing a bulk insert into a table using LOAD DATA INFILE. The table

RE: LOAD DATA INFILE performance testing

2001-08-06 Thread Jeff Tanner
DELAY_KEY_WRITE=ON by default Jeff -Original Message- From: Tim Bunce [mailto:[EMAIL PROTECTED]] Sent: Monday, August 06, 2001 9:00 AM To: Jeff Tanner Cc: '[EMAIL PROTECTED]' Subject: Re: LOAD DATA INFILE performance testing DELAY_KEY_WRITE=1 Tim. On Mon, Aug 06, 2001 at 07:36:17AM

Re: LOAD DATA INFILE with JDBC

2001-08-03 Thread Sinisa Milivojevic
Curtis Spencer writes: Is this possible with 2.0 version (type 4 I think) MM driver found on www.gjt.org? Also how do the file reading privileges for this work because I tried doing it and it gave me an authorization error even though my mysql user has FILE on it's privileges. Also, the

Re: Load data from text file/Excel worksheet

2001-07-16 Thread Paul DuBois
At 8:19 AM +0800 7/17/01, Erymuzuan Mustapa wrote: I have an Excel worksheet saved as text file(tab delimited), Load data works fine on my Win2k(MySQL 3.23.38) for bulk loading but on MacOS X , MySQL 3.23.39 the same same file doesn't seem to work right, all I got was malformed data. Using

Re: LOAD DATA INFILE

2001-07-05 Thread --==[bMan]==--
From my experience, if you want to import data into a date field, you have to make sure that the date format in your csv file conforms to a date format required by MySQL. This part is covered in MySQL documentation. So, your 20.12.1999 date should become 2001-12-20 and so on. P.S. Don't

Re: LOAD DATA INFILE

2001-07-05 Thread Bernhard Doebler
: Re: LOAD DATA INFILE From my experience, if you want to import data into a date field, you have to make sure that the date format in your csv file conforms to a date format required by MySQL. This part is covered in MySQL documentation. So, your 20.12.1999 date should become 2001-12-20

RE: LOAD DATA INFILE

2001-07-05 Thread John (*\\*)
.'-'.$day; return $date; } // dbDate Maybe able to run a similar function? John (*\*) -Original Message- From: Bernhard Doebler [mailto:[EMAIL PROTECTED]] Sent: 05 July 2001 12:46 To: [EMAIL PROTECTED] Subject: Re: LOAD DATA INFILE Hi, thanks for your answer. You never have problems

Re: LOAD DATA INFILE

2001-07-05 Thread Bernhard Doebler
far Bernhard Doebler - Original Message - From: John (*\*) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Bernhard Doebler [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 2:13 PM Subject: RE: LOAD DATA INFILE This is what i wrote to convert dates in PHP before putting them into db

RE: LOAD DATA INFILE

2001-07-05 Thread John (*\\*)
:[EMAIL PROTECTED]] Sent: 05 July 2001 13:35 To: [EMAIL PROTECTED] Subject: Re: LOAD DATA INFILE Hi, it seems to me I have to do something like this. It originally was my goal to only use SQL but this does not seem to be possible. Or do you think it's possible to reformat the string using left

Re: LOAD DATA INFILE + NULL

2001-06-24 Thread c.smart
Drop the quotes (') arround the NULL e.g.: 7,'Markovic Stevo',NULL,NULL Clive Smart WEBServ TomazSa wrote: I get *.csv file like this (1 string) : 7,'Markovic Stevo','NULL','NULL' When I use LOAD DATA INFILE syntax I get word NULL in field (MySQL table) q: I want field to be empty (in

Re: LOAD DATA INFILE + NULL

2001-06-24 Thread Tomaz Sajn
wow, that was fast, tnx (new on this m. list) why was mysql.com down for 2 days (or more)? lp, tomaz

Re: LOAD DATA INFILE + NULL

2001-06-24 Thread Paul DuBois
At 2:00 AM +0200 6/25/01, c.smart wrote: Drop the quotes (') arround the NULL e.g.: 7,'Markovic Stevo',NULL,NULL No. To load a NULL value into a column using LOAD DATA, you must use \N. NULL, with or without quotes, will insert as the word NULL. Clive Smart WEBServ TomazSa wrote: I get

RE: Load data infile date format issue

2001-05-10 Thread Don Read
On 09-May-01 Darla Baker wrote: I have a text file which is extracted from a non-sql database each night and then a cron sql script runs to insert the text data into the mysql database tables. My problem is that the date data in the text file is formatted incosistently (12/31/00 or

Re: Load Data Errcode 13

2001-04-16 Thread Gerald Clark
The server needs read and execute permissions all the way to the data file, and read permissions on the file. I you are on the server, try LOAD DATA LOCAL instead. Kalvin Kag Khetsavanh wrote: I keep getting the following error everytime i tried to use Load Data mysql load data infile

Re: LOAD DATA INFILE

2001-03-22 Thread mjriding
If it were me, I'd create a new table in the database with enough columns to handle all the data in the file. Then I'd do insert . . . . select into the table that need the data. Hope this helps, Michael Ridinger On Thu, 22 Mar 2001, Daniel Newman wrote: I've been looking into the help

RE: LOAD DATA INFILE has LINES TERMINATED BY problem?

2001-01-14 Thread Nick Gianakas
Richard, My suggestions is to use this command: LOAD DATA INFILE '/home/fpo/htdocs/secure/upload/export-customers.csv' REPLACE INTO TABLE tempCustomer FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' (customerid, custLastName, custFirstName, custEmail, deliveryDay, storeid) The only

<    1   2   3   4   5