To get the best of both world, you could use a loop to prepare your insert
statement (about the same time as multiple insert), and use direct dbms to
contact the database only once (may gain some performance if the insert is
of a large number of lines).

Patrick Turcotte

> -----Message d'origine-----
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]De la part de Chris Millet
> Envoye : 18 decembre, 2002 12:34
> A : Multiple recipients of list witango-talk
> Objet : Re: Witango-Talk: Inserting multiple records
>
>
> Thanks for your prompt replies. This is what I needed to know.
>
> Actually, a loop works quite well using SQL -- I was a little gun-shy from
> using FileMaker for so long. I'm also discovering how much more
> powerful and
> flexible SQL is and thought there might be an alternative I didn't know
> about.
>
> Chris
>
>
> > I agree. A loop is the easiest way to do it, but Chris did ask for
> > alternatives.
> > We once built a system that had to import 10s of thousands of records,
> > obviously too much for an insert loop. We did it with shell
> scripts and it
> > worked fine.
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Dan Stein
> > Sent: Wednesday, December 18, 2002 11:33 AM
> > To: Multiple recipients of list witango-talk
> > Subject: Re: Witango-Talk: Inserting multiple records
> >
> > I've always found the loop to be pretty fast even with 100's of records.
> > --
> > Dan Stein
> > Digital Software Solutions
> > 799 Evergreen Circle
> > Telford PA 18969
> > Land: 215-799-0192
> > Mobile: 610-256-2843
> > Fax 413-410-9682
> > FMP, WiTango, EDI,SQL 2000
> > [EMAIL PROTECTED]
> > www.dss-db.com
> >
> >> From: "David Shelley" <[EMAIL PROTECTED]>
> >> Reply-To: [EMAIL PROTECTED]
> >> Date: Wed, 18 Dec 2002 11:21:50 -0500
> >> To: Multiple recipients of list witango-talk <[EMAIL PROTECTED]>
> >> Subject: RE: Witango-Talk:  Inserting multiple records
> >>
> >> Chris,
> >>
> >> You can't directly insert an array into a db table.
> >> You may be able to write the array out to a file and use a
> database IMPORT
> >> command to load it into a table. I doubt that the ODBC driver
> supports an
> >> IMPORT command but you might be able to call it from a stored
> procedure,
> >> external action or shell script. However the overhead of doing
> this may be
> >> such that it would be faster to loop through the array and do INSERTs,
> >> unless the array is very large.
> >>
> >> Oh wait, you said 'an easy way'. OK never mind.
> >>
> >> Dave Shelley
> >>
> >> -----Original Message-----
> >> From: [EMAIL PROTECTED]
> >> [mailto:[EMAIL PROTECTED]]On Behalf Of Chris Millet
> >> Sent: Wednesday, December 18, 2002 10:42 AM
> >> To: Multiple recipients of list witango-talk
> >> Subject: Witango-Talk: Inserting multiple records
> >>
> >>
> >> Is there an easy way to insert multiple records into a database without
> >> using a loop? It seems DirectDBMS would work since MySQL will
> insert many
> >> rows at a one time from other tables and files using the
> INSERT...SELECT
> >> statement, but I'm not certain how it would work using an array.
> >>
> >> Chris
> >
> > ________________________________________________________________________
> > TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
> >               with unsubscribe witango-talk in the message body
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
>                 with unsubscribe witango-talk in the message body
>

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to