home bbs files messages ]

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 19,077 of 19,505   
   Shelly to Erland Sommarskog   
   Re: Varbinary and nvarchar problem   
   21 Jun 14 09:17:59   
   
   From: sheldonlg@thevillages.net   
      
   On 6/20/2014 10:16 AM, Erland Sommarskog wrote:   
   > Shelly (sheldonlg@thevillages.net) writes:   
   >> Anyway, I have the solution.  It is to enclose the HASHBYTES stuff with   
   >> the following:   
   >>   
   >> SUBSTRING(master.dbo.fn_varbintohexstr(  hashbytes calculation ), 3, 32).   
   >>   
   >> The result is a 32 character hex string put into the tracking table.   
   >>   
   >   
   > If you are on SQL 2008, use   
   >   
   >    convert(varchar(32), hashbytes, 2)   
   >   
   > instead, as this is a documented and supported way to get a hex string.   
      
   Thanks.  I'll try that.   
      
   --   
   Shelly   
      
   --- 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