Rajdeep Debnath
Old Hand
Points: 307
More actions
February 26, 2007 at 11:41 pm
#176098
Hi,
My query is.....
DECLARE
@t timestamp
SET
@t=(select @@DBTS)
Print
@t
But the following error is generated....
Operand type clash: timestamp is incompatible with nvarchar
Could u plz help me..
Regards,
Rajdeep
Michael Dye
Valued Member
Points: 51
February 27, 2007 at 1:17 am
#691981
Good morning,
It's the PRINT statement that is causing the error:
-- declare variable
-- set variable
@t = @@DBTS
-- need to convert a timestamp to print it
PRINT
convert(varbinary, @t)
-- to confirm
@@DBTS
Thanks,
Dr. Michael Dye.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply