Depends on what DB you are using... This *should* be valid for SQL2k
<CFQUERY NAME="foo" DATASOURCE="bar">
INSERT INTO foo (bar)
VALUES ("homer")
SELECT *
FROM foo
WHERE fooid = Scope_Identity()
</CFQUERY>
-----Original Message-----
From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
Sent: Monday, September 15, 2003 21:07
To: SQL
Subject: insert/select
Is there a way of doing an insert and a select on the data that was just
inserted as a single operation inside a CFQUERY tag? Not in an SP, but as
straight SQL. If not, I'll have to do the transaction, insert, select thing.
I'm just looking for the best option. Thanks
Michael Dinowitz
Finding technical solutions to the problems you didn't know you had yet
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:6
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:6
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=<:emailid:>.<:userid:>.<:listid:>
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
http://www.cfhosting.com