Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
stroek
Starting Member
18 Posts |
Posted - 2008-08-07 : 07:54:06
|
What is the correct way to do next:DECLARE @CheckID INT@CheckID = select * from TableAselect * from TableB where ID = @CheckIDTks |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-08-07 : 08:22:02
|
quote: Originally posted by stroek What is the correct way to do next:DECLARE @CheckID INT@CheckID = select * from TableAselect * from TableB where ID = @CheckIDTks
DECLARE @CheckID INTSELECT @CheckID = ID from TableAselect * from TableB where ID = @CheckIDMadhivananFailing to plan is Planning to fail |
 |
|
stroek
Starting Member
18 Posts |
Posted - 2008-08-07 : 09:01:02
|
tks |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-08-07 : 09:04:39
|
Note that if you have many ids in tableA, only last returned id would be stored in the varialbe @CheckIDMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|