bcp

SQL Server BCP export corrupted file?

↘锁芯ラ 提交于 2019-11-26 08:35:02
问题 i have a small problem with BCP functionality in SQL Server 2012. The things is: im loading .jpg image (167KB in size) using below command: INSERT [tabela_testowa] ( Data ) SELECT * FROM OPENROWSET (BULK N\'C:\\foty\\ch6_MagicShop.jpg\', SINGLE_BLOB) a; and then im trying to export it back to disk using: BCP \"SELECT data FROM tabela_testowa WHERE ID = 1\" queryout \"C:\\test\\file.jpg\" -T -n -d test File gets saved on disk no problem, size is also 167 KB but.. it cant be opened like the

How to export data from SQL Server 2005 to MySQL [closed]

随声附和 提交于 2019-11-26 08:01:54
问题 I\'ve been banging my head against SQL Server 2005 trying to get a lot of data out. I\'ve been given a database with nearly 300 tables in it and I need to turn this into a MySQL database. My first call was to use bcp but unfortunately it doesn\'t produce valid CSV - strings aren\'t encapsulated, so you can\'t deal with any row that has a string with a comma in it (or whatever you use as a delimiter) and I would still have to hand write all of the create table statements, as obviously CSV