title: Manually inserting varbinary data into SQL Server
body: <p>We have a SQL Server table for user settings.  Originally the settings were domain objects which had been serialized as XML into the table but we recently begun serializing them as binary.</p>
  
  <p>However, as part of our deployment process we statically pre-populate the table with predefined settings for our users.  Originally, this was as simple as copying the XML from a customized database and pasting it into an INSERT statement that was ran after the database was built.  However, since we've moved to storing the settings as binary data we can't get this to work.  </p>
  
  <p>How can we extract binary data from a varbinary column in SQL Server and paste it into a static INSERT script?  We only want to use SQL for this, we don't want to use any utilities.</p>
  
  <p>Thanks in advance,
  Jeremy</p>