varbinary to string on SQL Server

后端 未结 7 1076
时光说笑
时光说笑 2020-11-27 15:41

How to convert a column value from varbinary(max) to varchar in human-readable form?

相关标签:
7条回答
  • 2020-11-27 16:41

    Have a go at the below as I was struggling too original post [Here][1]

    bcp "SELECT CAST(BINARYCOL AS VARCHAR(MAX)) FROM OLTP_TABLE WHERE ID=123123 AND COMPANYID=123" 
    queryout "C:\Users\USER\Documents\ps_scripts\res.txt" -c -S myserver.db.com  -U admin -P password
    
    
      [1]: https://stackoverflow.com/questions/60525910/powershell-truncating-sql-query-output?noredirect=1#comment107077512_60525910
    
    0 讨论(0)
提交回复
热议问题