I try to export long binary field to text file and insert into to another database, but the export of the long binary will not be correct. I'm writing this way:
SELECT long_binary_filed from testtable; output to 'c:\\temp\\Test1.txt' ENCODING 'utf-8';
What I'm wondering is how I can export long binary fields to a text file so I can add it to another database then with an insert?
Request clarification before answering.
I suggest that you use xp_write_file() since it will not try to do any character conversion on the binary blob when it writes it to the file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.