Hi Barney,
I have over 1 million records to import daily would that not be very taxing on the server?
----- Original Message -----
From: Barney Boisvert
To: CF-Talk
Sent: Tuesday, April 13, 2004 3:16 PM
Subject: RE: Import a Text file to MYSQL
You can use LOAD DATA INFILE if you have sufficient privileges on the server
and the file format is acceptable. If not, it's pretty simple to do some
text manipulation and convert text into a multi-line INSERT statement:
INSERT INTO tabl
(col1, col2, col3)
VALUES
('11', '12', '13'),
('21', '22', '23'),
('31', '32', '33'),
.....
('n1', 'n2', 'n3)
Basically, it goes like this: replace all "'" with "\'", add "('" to the
start of every line, add "')" to the end, replace "," with "','", prepend
the INSERT .... VALUES stuff, and then remove the trailing comma.
Cheers,
barneyb
> -----Original Message-----
> From: Mickael [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 13, 2004 12:06 PM
> To: CF-Talk
> Subject: Import a Text file to MYSQL
>
> Hello All,
>
> Can you import a text file to MYSQL with CF. I would like to
> take a text file that is exported to Access then Drop/Create
> the table with CF in MYSQL then import the file in its
> entirety to create the table.
>
> This sounds simple enough in theory, how can this be done in
> CF and MYSQL I don't really have any experience with MYSQL
>
> Thanks in advance
>
> Mike
>
>
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Import a Text file to MYSQL Mickael
- RE: Import a Text file to MYSQL Barney Boisvert
- RE: Import a Text file to MYSQL Mickael
- RE: Import a Text file to MYSQL Barney Boisvert
- Re: Import a Text file to MYSQL Mickael
- RE: Import a Text file to MYSQL Barney Boisvert
- Re: Import a Text file to MYSQL Mickael
- Re: Import a Text file to MYSQL Brook Davies
- FYI : Resource Manager Application n... Mike Chambers
- RE: Import a Text file to MYSQL Barney Boisvert