Home Forums SQL Server 2008 T-SQL (SS2K8) Detect / Determine data stored in a varbinary field RE: Detect / Determine data stored in a varbinary field

  • You can try converting the string to varchar or nvarchar to see if meaningful text comes out, but that assumes meaningful text was put in in the first place. If the column can be a text string, a jpg or a pdf, how to retrieve and interpret that data should be included when the data is stored down (and arguably not even in the same column).

    Beyond checking if it casts to a varchar or nvarchar, I would think you'd need to write a CLR or an application to check the contents of each varbinary value against the possible expected types by brute force.

    I think the real issue is to know what is getting store down in the first place.

    Executive Junior Cowboy Developer, Esq.[/url]