Last active
May 1, 2021 21:47
-
-
Save LQ80/c38f562071969bd6edcc6313bc6f1073 to your computer and use it in GitHub Desktop.
MS SQL - Export Binary field to file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bcp "SELECT [filedata] FROM [database].[dbo].[files] where [id] = {ID NUMBER}" queryout "{OUTPUT FILE NAME}" -S {MS SQL SERVAER NAME}\SQLEXPRESS -T -f bcp.fmt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment