I m stuck at this place. I m trying to get a single rowset value in a variable.
DECLARE @last_timestamp as varchar;
SET @last_timestamp = SELECT MAX(modify_timestamp) FROM dbo.table1
PRINT @last_timestamp
It is returning the below error
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'SELECT'.
Is Cursor the only solution to this problem. Any help would be helpful ?
Try:
or