By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,766 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,766 IT Pros & Developers. It's quick & easy.

How do I use bcp to insert into sybase

P: 27
Well this is for Sybase, running on server 2003, but this seemed the most relevant place to post

I have a .txt file with data I would like to insert into a Sybase table.
I'm new to Sybase, as well as, bcp, could some one give me an example of how to do this.

I have a table with three columns (a_1,a_2,a_3). Lets say the file name is apple.txt (this is a tab delimitated file). Data looks something like:

red green yellow
red yellow green
green red yellow
green yellow red
yellow red green
yellow green red

Could some one give be an example of how to insert this into Sybase using bcp.

I have no clue how to do this. Looking for syntax and any good example you can give me.
Sep 17 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,017
Sorry, I didn't do Sybase for a while and don't have server to test on. So from the top of my head:

1. Search for bcp.exe on your computer.
2. Open cmd prompt and change to that direcgtory.
3. Run something like this:
bcp database_name.owner.table_name in datafile -n -U username -P password

For more info go to:;pt=2262
or just use Sybase help.

Good Luck.
Sep 18 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.