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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Partial BCP

Status
Not open for further replies.

KarthikBabu

Programmer
Jul 17, 2001
18
0
0
IN
Is Partial BCP possible?

My requirement is to migrate a part of the data in a table from one server to another. Say, data belonging to a particular department. Can BCP be used for this purpose? If so, how ?

Please note: I cannot use the "-F" and "-L" options as the data that needs to be migrated is randomly distributed in the table.
 
Hiya,

Which version of BCP are you using? If it is version 12, you can BCP out through a view, which you could then construct your where clause in.

NB - You don't need to be using Sybase v.12 to have BCP v.12

Tim
 
We are using 11.1.1.

As a temp solution, we are extracting the data using SQL statements and then using "bcp in" for loading into the target server.
 
do a select into and build a perm temp table
and then bcp that table out

select *
into my_temp_table
from table_name
where
department = 'Finance'

then bcp out my_temp_table
:)

If is space is an issue le
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top