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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 variables

Author  Topic 

rjhe22
Constraint Violating Yak Guru

283 Posts

Posted - 2014-07-18 : 13:17:11

hi
how can i get this to work
DECLARE @FK_DataLoadBatch INT;

SET @FK_DataLoadBatch =(
SELECT PK_DataLoadBatch
FROM DataLoadBatch
WHERE Status IN ('In Process')
AND LoadType = 'gl')

i want to set @FK_DataLoadBatch equal to the number from PK_DataLoadBatch

thanks

rjhe22
Constraint Violating Yak Guru

283 Posts

Posted - 2014-07-18 : 13:19:00
its grand its working
Go to Top of Page
   

- Advertisement -