November 1, 2002 at 8:36 am
Project: Transfer data from 100+ tables.
Issue: Some source tables contain more columns than the destination tables, otherwise all structure is the same. All extra columns in source tables begin with the same word.
Scripts used: dbsp_bcp_in and dbsp_bcp_out scripts found on this site.
Question: Is using a format file the only solution? Is there another way to exclude these columns during the bcp-in process?
Any suggestions?
RS
November 1, 2002 at 9:49 am
No, you need a format file.
Steve Jones
November 1, 2002 at 9:54 am
I was afraid of that 🙁 . BTW, thanks for the dbsp_bcp_in and dbsp_bcp_out scripts.
November 1, 2002 at 1:33 pm
You are welcome. Meant to be a pair, boot data out and then in on another server.
You can use the interactive bcp import to create a format file. Look it up in books online and experiment.
Steve Jones
November 2, 2002 at 6:41 am
you can create a view of your table with only the relevant columns and bcp into that rather than the table
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply