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 |
|
shankbond
Starting Member
5 Posts |
Posted - 2009-12-21 : 07:46:15
|
| hi,is it possible to convert a varchar(8000) to varbinary(max)?I cannot use Convert and Cast functions,because msdn says that these functions cannot convert Varchar to Varbinary. Is there some different way I can convert it?Any help shall be appreciatedThanks |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-12-21 : 07:53:14
|
HiYou mean this..DECLARE @X VARCHAR(8000)SET @X = 'TESTING'SELECT @X AS [VARCHAR], CAST(@X AS VARBINARY(MAX)) AS [VARBINARY] -------------------------R... |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-12-21 : 10:42:02
|
quote: Originally posted by shankbond hi,is it possible to convert a varchar(8000) to varbinary(max)?I cannot use Convert and Cast functions,because msdn says that these functions cannot convert Varchar to Varbinary.
where does it say that?see here: http://msdn.microsoft.com/en-us/library/ms187928.aspx |
 |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2009-12-21 : 10:45:06
|
| Perhaps he's confused varchar with sql_variant?JimEveryday I learn something that somebody else already knew |
 |
|
|
mldardy
Starting Member
13 Posts |
Posted - 2009-12-21 : 11:18:25
|
quote: Originally posted by jimf Perhaps he's confused varchar with sql_variant?JimEveryday I learn something that somebody else already knew
Perhaps you don't know what you are talking about. |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-12-21 : 12:01:49
|
| wow. no need for that. perhaps you should have more than 9 posts b4 you start flaming people up |
 |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-12-21 : 14:57:54
|
| lol. nice. |
 |
|
|
shankbond
Starting Member
5 Posts |
Posted - 2009-12-22 : 05:46:52
|
| May be I misinterpreted or misunderstood the MASN link, here is the link where i got confused.http://msdn.microsoft.com/en-us/library/ms191530.aspx.Now the problem is solved as I did more research on Convert and Cast.Thanks a lot anyways :) |
 |
|
|
|
|
|