Suppose i have a table that contains 5 columns like
col1,col2...colm5.I want to import only two column through
BCP utility.How to do same through BCP in sybase.



Suppose i have a table that contains 5 columns like col1,col2...colm5.I want to import only two co..

Answer / Rajnish Kumar Shriwastawa

To import only two columns using BCP (Bulk Copy Program) in Sybase, you can use the FORMATFILE option and specify the desired columns in the format file. Here's an example format file for importing only col1 and col2:

1. col1 VARCHAR(50)
2. col2 VARCHAR(50)
3. col3 BINARY(8) NULL
4. col4 BINARY(8) NULL
5. col5 BINARY(8) NULL

After creating the format file, execute the following command to import data:

bcp mydatabase.myschema.mytable in formatfile = myformatfile -c -t"," -S servername -U username -P password

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is wide table?

1 Answers  


What is join query?

1 Answers  


What is trigger and different types of Triggers?

1 Answers   QuestPond,


How do I connect to sql server database?

1 Answers  


what protocol both networks use? : Sql server database administration

1 Answers  


What are different types of database indexes?

1 Answers  


How many types of the database links?

1 Answers   MCN Solutions,


Explain what are magic tables in sql server?

1 Answers  


Why is DML provided?

1 Answers   Ernst Young, Thomson Reuters,


What is the cartesian product of the table?

1 Answers  


What is the difference between a Application Server and a Database

3 Answers   Oracle,


what's sql server? : Sql server database administration

1 Answers  


Categories