Actually the first query was supposed to return something... the original
query went something like this

                                declare @tableId int
                                if not exists (
                                        select tableid from table
                                        where
someotherID=#arguments.someotherID#
                                ) 
                                begin
                                        insert into table (
                                                someotherId
                                        ) values (
                                                #arguments.someotherID#
                                        )
                                        set @tableId = @@IDENTITY
                                        select @tableId as tableId
                                end

Is there a way to make it return a value if the id is already in the
database?

Russ

> -----Original Message-----
> From: Ian Skinner [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 16, 2006 5:39 PM
> To: CF-Talk
> Subject: RE: ColdFusion var bug?
> 
> Is this a CF bug?  I got around it by creating a local struct and then
> putting those variables into that struct, but in general, this is not
> intended behaviour, correct?
> 
> Probably not, but you also do not need the name parameter for the first
> query since, as you say, it does not return a value.  I suspect that would
> also be a work around.
> 
> 
> 
> 
> --------------
> Ian Skinner
> Web Programmer
> BloodSource
> www.BloodSource.org
> Sacramento, CA
> 
> ---------
> | 1 |   |
> ---------  Binary Soduko
> |   |   |
> ---------
> 
> "C code. C code run. Run code run. Please!"
> - Cynthia Dunning
> 
> Confidentiality Notice:  This message including any
> attachments is for the sole use of the intended
> recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the
> intended recipient, please contact the sender and
> delete any copies of this message.
> 
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250076
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to