Udo Stanja writes:
> M wrote:
> >
> > Hi,
> >
> > 1. Is it faster to import a file with thousands of INSERT statements
> > like this eg.
> >
> > % mysql -h myhost -u me -pmypassword myDB < fileWithInserts.txt
> >
> > 2. Or, to hard code the INSERT syntax into a C program, for example (I
> > have a C program to extract data from file with fixed length fields),
> > and insert the data straight into a table (with a loop)? I've done it
> > this way eg.
> >
> > mysql_query(sock, "insert into temp (product_no, product_name, qty)
> > values (%s, '%s', %s)"
> >
> > I don't have file privs in the 'user' grant table, so I cannot use
> > LOAD
> > DATA INFILE. I'm trying to work out the quickest way of doing this.
> > Thanks for any help.
> >
> > Michael
> >
> > ---------------------------------------------------------------------
> > Please check "http://www.mysql.com/Manual_chapter/manual_toc.html"
> > before
> > posting. To request this thread, e-mail
> > mysql-thread14999@stripped
> >
> > To unsubscribe, send a message to the address shown in the
> > List-Unsubscribe header of this message. If you cannot see it,
> > e-mail mysql-unsubscribe@stripped instead.
>
>
> Hallo,
> most there is it possible to use the following
>
> load LOCAL data infile ...
>
> in my case that was the solution.
>
> Udo
>
>
>
Try:
load data infile local...
Sinisa
+----------------------------------------------------------------------+
| TcX ____ __ _____ _____ ___ == mysql@stripped |
| /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic |
| /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sinisa@stripped|
| /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus |
| /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ |
| ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ |
| /*/ \*\ Developers Team |
+----------------------------------------------------------------------+