Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 17,810 of 19,505    |
|    Dan Guzman to All    |
|    Re: Strip the first byte from an image c    |
|    08 Jun 10 07:52:25    |
      XPost: microsoft.public.sqlserver.programming       From: guzmanda@nospam-online.sbcglobal.net              > No apparent difference, either I am mistaking the root cause of the       > problem, or the substring (and I tried right()) are doing an implicit       > conversion to varchar or something...              No conversion should occur here. I ran the script below with a 10K hex       value and it ran as expected.              CREATE TABLE dbo.foo([image] image)       INSERT INTO dbo.foo VALUES(0x2500000000000000) --use a longer value to test              SELECT       SUBSTRING(CAST([image] AS varbinary(MAX)), 2, DATALENGTH(image)-1)       FROM dbo.foo;              --       Hope this helps.              Dan Guzman       SQL Server MVP       http://weblogs.sqlteam.com/dang/              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca