|
|
Question : SCRIPT for generate BCP flat file ...from MYSQL file <MIGRATION>
|
|
my Mysql file look like this
insert into xyz values("abc",23); insert into xyz values("bcd",34); insert into zzz values (34,"asdf",NULL); insert into zzz values (22,"aaa","afb");
Is there any utility that help for migration to convert the above txt file like below and automatically execuate bcp for each table? (in this case only 2 tables, what if we have 1000 tables ? this will be tedious if i do it manually as below )
Does anyone has any sample script ?
bcp db..xyz in file.txt -Usa -P -SLOCALHOST -t , -c with txt file like this... "abc",23 "bcd",34
and
bcp db..zzz in file2.txt -Usa -P -SLOCALHSOT -t ,-c with txt file like this... 34,"asdf",NULL 22,"aaa:,"afb"
thank you for answer. 200 points for best answer with example workable script.
|
Answer : SCRIPT for generate BCP flat file ...from MYSQL file <MIGRATION>
|
|
Not sure I'm understanding the problem - if you already have a file full of INSERT statements like that, then with very little modification those will work in Sybase.
Converting the mySQL file into a file of raw data and then using bcp seems like more work, particularly as you'll have to strip out all the quote characters for bcp...
Am I missing something?
|
|
|
|
|