You can do a lot:
<cfquery
name="qry_allTaxologyKeysBelow"
connectstring="#request.dbConnectionString#"
dbtype="dynamic">
SET NOCOUNT ON
DECLARE
@tblVar#listFirst(GetFileFromPath(GetCurrentTemplatePath()), ".")# TABLE
(
tablePK int identity(1,1),
tblProductTaxologyPK varchar(10)
)
DECLARE @continue int
INSERT INTO
@tblVar#listFirst(GetFileFromPath(GetCurrentTemplatePath()), ".")#
SELECT tblProductTaxologyPK
FROM #request.sqlObjectPrefix#tblProductTaxology
WHERE parentFK = <cfqueryparam
value="#attributes.taxologyKeyList#" cfsqltype="CF_SQL_INTEGER">
SET @continue = @@ROWCOUNT
WHILE @continue > 0
BEGIN
INSERT INTO
@tblVar#listFirst(GetFileFromPath(GetCurrentTemplatePath()), ".")#
SELECT tblProductTaxologyPK
FROM
#request.sqlObjectPrefix#tblProductTaxology
WHERE parentFK IN (
SELECT DISTINCT tblProductTaxologyPK
FROM
@tblVar#listFirst(GetFileFromPath(GetCurrentTemplatePath()), ".")#
)
AND tblProductTaxologyPK
NOT IN (
SELECT DISTINCT tblProductTaxologyPK
FROM
@tblVar#listFirst(GetFileFromPath(GetCurrentTemplatePath()), ".")#
)
SET @continue = @@ROWCOUNT
END
SET NOCOUNT OFF
SELECT *
FROM
@tblVar#listFirst(GetFileFromPath(GetCurrentTemplatePath()), ".")#
</cfquery>
>>-----Original Message-----
>>From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]]
>>Sent: Friday, September 20, 2002 12:37 PM
>>To: CF-Talk
>>Subject: OT: Multiple Inserts
>>
>>Can you do multiple insert statements in one CFQUERY statement?
>>
>>ie
>><cfquery ...>
>>Insert into ....
>>
>>Insert Into ...
>>
>>Insert Into ...
>></cfquery>
>>
>>If yes, is there something special that needs to be added?
>>
>>Thanks
>>Paul Giesenhagen
>>QuillDesign
>>
>>
>>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists