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 |
G_Ozama
Starting Member
12 Posts |
Posted - 2008-09-03 : 21:22:02
|
hi... i have an Hex value stored in a VARCHAR column, and i want to "copy" it to a VARBINARY column without losing it records...here's a sample:0x110000FF0000 is stored in the column named table_test1 (varchar(180))when i try to convert usingquote: BEGINDECLARE @TEST1 VARCHAR(180)DECLARE @TEST2 VARBINARY(180)SELECT @TEST1 = (SELECT test_table1 FROM test_table)SELECT @TEST2 = (SELECT CONVERT(varbinary(180),@TEST1))ENDPRINT @TEST2
i get this result:quote: 0x3078313130303030464630303030
how i can use a similar query to @TEST2 be varchar and exactly as the value is stored in table_test1???thx in advance |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
|
|
|
|