On Thu, May 16, 2002 at 03:55:29PM -0500, Kevin O wrote:
> My problem is, I have 500 fields.  I know I can start the Insert statement 
> like INSERT INTO mytable VALUES - cause I'm inserting a value for every 
> field in the database, but do I have to type a "?" for all 500 fields?  
> BTW, I'm just feeding execute with an array of values, like above.

Do you have to -type- 500 "?"'s?  No.

    join(", ", ("?") x 500);

Insert where appropriate.

However, you may run into problems with your driver or database in dealing
with that much data in a single query.  You should probably either do as
another suggested, redesign your table so it's a little more sane, or
process the data in batches (100 at a time, perhaps).  Unless, of course,
neither your driver or database have an issue with it.


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to