Dec 9, 2003 #1 chicdog Programmer Feb 28, 2002 84 US Is it possible to set two variables to receive the result of a Select statement knowing that there will be ONLY one row returning. SET @Var1, @Var2 = (Select A,B From tblTable Where Key=3) Thanks, Bryan
Is it possible to set two variables to receive the result of a Select statement knowing that there will be ONLY one row returning. SET @Var1, @Var2 = (Select A,B From tblTable Where Key=3) Thanks, Bryan
Dec 9, 2003 1 #2 jby1 Programmer Apr 29, 2003 403 GB Code: Select @Var1=A, @Var2=B From tblTable Where Key=3 You will need to declare @Var1 and @Var2 before doing this. Upvote 0 Downvote
Code: Select @Var1=A, @Var2=B From tblTable Where Key=3 You will need to declare @Var1 and @Var2 before doing this.
Dec 9, 2003 Thread starter #3 chicdog Programmer Feb 28, 2002 84 US Thank you for the help. Bryan Upvote 0 Downvote