> Thanks Isaac, that's interesting... I'd never really thought about > how I used that code at all, I just pasted in the example from MSDN > and it had the right end result so I ran with it. You're right about > it returning multiple rows - that's inefficient.
So it is actually returning multiples? And MSDN gave you that as the example... heh... that's kinda funny. It's been a little while since I worked with scope_identity() -- at my day job currently we're using mostly MS variety of GUID values. Also if you're using CF8, you might also want to consider switching to using CF for your identity values instead of doubling up your query statements (which for whatever totally non-rational reason always seemed weird to me even though I did it and it worked). <cfquery dsn="..." return="insert"> insert into mytable (...) values (...) </cfquery> <cfoutput>#insert.identitycol#</cfoutput> I think it's unfortunate that although they added those values, they force you to use a different name to get it based on your database platform instead of adding a "facade" for you... http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_p-q_17.html#1102316 -- s. isaac dealey ^ new epoch isn't it time for a change? ph: 503.236.3691 http://onTap.riaforge.org/blog ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296939 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

