467,149 Members | 1,269 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,149 developers. It's quick & easy.

How do I use bcp to insert into sybase

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
  • viewed: 10870
Share:
1 Reply
iburyak
Expert 512MB
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:

http://manuals.sybase.com/onlinebook...w/2105;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.

Similar topics

2 posts views Thread by newbie_mw | last post: by
2 posts views Thread by Tobes \(Breath\) | last post: by
2 posts views Thread by eight02645999@yahoo.com | last post: by
3 posts views Thread by Alex Murphy | last post: by
reply views Thread by =?ISO-8859-1?Q?S=E9bastien_Sabl=E9?= | last post: by
3 posts views Thread by Ultrak The DBA | last post: by
6 posts views Thread by =?Utf-8?B?TWVs?= | last post: by
reply views Thread by =?ISO-8859-1?Q?S=E9bastien_Sabl=E9?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.