How would you select from an XML document in sql server?  

What I really need to do is insert lets say 100k simple records such as 

Firstname, lastname, emailaddress

Into several tables.  

I have it working already with a loop and doing the 100k inserts, and it
runs a little slow (Although not too bad).  

I tried converting it to a single query and it basically timed out on me.  I
guess sql server could not handle the huge query like that. 

Would be nice to make it into a stored procedure, but I don't really know
how to pass that list into SQL.  How would I do it with XML?

Russ

> -----Original Message-----
> From: Brad Wood [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 21, 2006 1:39 PM
> To: CF-Talk
> Subject: RE: cfsavecontent and cfqueryparam
> 
> Not a bad idea.  If all the inserts are into the same table, I have had
> good luck generating a simple xml document, passing it into a text input
> in a MS SQL server 2000 proc, selecting from the xml into a temp table,
> and then doing one insert.
> 
> ~Brad
> 
> 
> How about passing a list into a stored procedure and looping over the
> list
> within the stored procedure to do all your inserts?
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:233017
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to