Getting a pdf file out of slate


select top 1 path as [pdfpath], cast(N'' as xml).value('xs:base64Binary(sql:column("f.data"))', 'varchar(max)') as [pdfdata]
from [file] as f where path like '%Stuff%'