Quantcast
Channel: VBForums - Database Development
Viewing all articles
Browse latest Browse all 2918

Extract File from FileTable

$
0
0
Hello, I know how to copy a file from my FileSystem to a FileTable in SQL using TSQL.

Code:

INSERT INTO Designs ([name],[file_stream])
SELECT 'Ime.xlsx' ,*
FROM OPENROWSET(BULK N'C:\Users\kalim\Documents\Ime.xlsx', SINGLE_BLOB) AS FileData

But how do I do the opposite? that is, copy a file that I have in the FileTable to a folder in my PC?

Note: I have Non-Transactional access disabled so the FileTable is not visible to the File System

Viewing all articles
Browse latest Browse all 2918