Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BCP command - long text field

Status
Not open for further replies.

kizziebutler

Programmer
Apr 28, 2005
81
GB
I doing large amount of extractions from our SQL 2000 server to oracle. There is a field in sql (text field), when you select the max(datalength) on the field it comes to 984989. This field contains XML coding with return characters, <> characters etc. The destination field in oracle is a clob field. My biggest problem is I am trying to get the field enclosed by '|' delimited. It causing a big problem as the text field containing the xml coding does not appear on one line. I have tried to enclosed it with a clobstart and clobend, but it still coming out incorrectly. An example of the BCP command.

bcp "select lineone, data from table_view" queryout "c:\extracts\extract.txt" -c -r "clobstart" -t "clobend" -SIRA9014. I am doing this from memory so I know some of the switches will be incorrect. What I am trying to achieve is, what is the best method of extracting a field containing xml coding with returns characters enclosing it, with clobstart and clobend so that I can insert into oracle correctly maintaining the formats. Would DTS or BCP, which is prefered????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top