SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Set @Var = Scope_Identity() adds INTO

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Set @Var = Scope_Identity() adds INTO
Author Message
judahr



Joined: 09 Mar 2007
Posts: 314
Country: United States

Post Set @Var = Scope_Identity() adds INTO Reply with quote
v 3.5.21 SSMS

Set @Var = SCOP

Hit enter to select Scope_Identity()

Outputs:

Set @Var = INTO SCOPE_IDENTITY

Should be:

Set @Var = Scope_Identity() -- ideally
or
Set @Var = Scope_Identity --if you must.
Thu Jun 26, 2008 4:08 pm View user's profile Send private message
judahr



Joined: 09 Mar 2007
Posts: 314
Country: United States

Post Reply with quote
Might be caused by my Insert statement that doesn't have an INTO, although it is otherwise complete. Set statement is after a closed Values clause.

CONFIRMED. It tries to add INTO to anything if Insert statement doesn't have it.
Thu Jun 26, 2008 4:09 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6512

Post Reply with quote
I'm not sure I understand the issue. If I open new query editor and paste your code as is I don't get and I don't expect to get a popup after SCOP. There must be something above the referenced line that is causing a different effect.
Thu Jun 26, 2008 4:54 pm View user's profile Send private message
judahr



Joined: 09 Mar 2007
Posts: 314
Country: United States

Post Reply with quote
You need an Insert statement above without an INTO:

Declare @id int

Insert dbo.Table1(column1) values(@Column1)

Set @id = Scop
Thu Jun 26, 2008 5:25 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6512

Post Reply with quote
Got it

Code:
Declare @id int
Insert dbo.Table1(column1) values(@Column1)
Set @id = INTO SCOPE_IDENTITY


I will talk to our developers and check what they can say about this issue, whit the application attempts to complete INSERT syntax but does it in a wrong place.
Thu Jun 26, 2008 5:31 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6512

Post Reply with quote
This behavior will be corrected in the next maintenance release, which we expect to be available by the end of the week or sooner.
Tue Jul 01, 2008 12:36 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.