Professional Documents
Culture Documents
10681/
SQL Server 2000 sp3a I need to convert a timestamp value to a varchar. I need to build a string will look like this : DECLARE @String varchar(8000) SELECT @String = 'INSERT INTO Table2 SELECT * FROM Table1 WHERE timestamp >= ' + @TimeStampVal EXEC (@String) Since it is possible in Query Analyser to see the actual value of a timestamp I figure it is possible to use it in a string one way or another. It is impossible to do that though : CONVERT(varchar(50), @@DBTS) Anyone have a clue on this one ? Thanks
The best I can find is something like: select convert(varchar(255),convert(datetime,timestamp)) from exampletable But I can't understand why BOL said one thing and does not work.