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,073 of 19,505   
   Shelly to All   
   Varbinary and nvarchar problem   
   19 Jun 14 15:00:26   
   
   From: sheldonlg@thevillages.net   
      
   I have a table with a field that is nvarchar.  The input data is   
   obtained from first doing a HASHBYTES(MD5, the_char_string). Call this   
   the_data.   
      
   If I first do a CAST(the_data as NVARCHAR)  or if I do a   
   CONVERT(NVARCHAR, the_data), then there is no problem with inserting the   
   field.  However, when I do a select * via Sqlserver Manager, that field   
   contains the string "??????".   
      
   If I do not first do the conversion, it insert the hash into the field,   
   and succeeds for the first 15 of 1991 records.  It then bombs with   
   "incorrect syntax near '<9e>V!¢(Q Ã+;<86>"^@Lmç'.   
      
   This process is interrogating a join of two tables and then is inserting   
   a processing of the resulting data rows into another table.  It is on   
   the insert (which is one condition of a merge statement) where the   
   failure occurs.   
      
   Does anyone have a suggestion on how I can get the data into the third   
   table and not have it all be "???????".   
      
   --   
   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