I bet there are a lot of us who would love a way to do this. I recently
posted a question about this, figuring that if there was a way, it would be
through wddx (the thread was "wddx --> SQL Server 7 ?"). I ended up doing
what you say here: parsing through in SQL. But I also ran some simple
tests, comparing the stored proc to passing 40 to 50 insert statements in a
single cfquery statement, and I couldn't believe it but there was little
difference. (I used "set nocount on" in both). I'm currently trying to
figure out how to speed it up, because it's taking 3 seconds! Taking the
data from the structure in CF memory to a string happens quickly, but SQL
goes slowly, and still has to perform multiple inserts.

Mark

[EMAIL PROTECTED]



ok, you have me intrigued.  Are you talking about a PL/SQL procedure that
takes the entire array and then parses it?  Won't you be looping through
the
array anyway?

Brian

-----Original Message-----
From: Eric Barr [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 19, 2000 11:31 AM
To: CF-Talk
Subject: RE: Bulk Insert?


Jon,

You can get away with this in some situations through some clever
gymnastics
in your sql.

What it will come down to is passing a string into a stored procedure that
you then do some string parsing and looping and use EXEC()  (assuming your
using SQL server).  Althouhg procedding in this manor does impose some
constraints: a lot of string manipulation in SQL is generally a bad idea,
limit to the length of the string that can be passed in, etc......  But, I
would try it out both ways and run some informal performance tests to
figure
out which way fits your specific situation.


-eric
------------------------------------------------
If to please people we offer what we ourselves disapprove, how can we
afterwards defend our work.
-George Washington

Eric Barr
Zeff Design
(p)  212.714.6390
(f)   212.580.7181






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to