473,386 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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
1 11095
iburyak
1,017 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

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

Similar topics

2
by: newbie_mw | last post by:
Hi, I need urgent help with a novice problem. I would appreciate any advice, suggestions... Thanks a lot in advance! Here it is: I created a sign-up sheet (reg.html) where people fill in their...
4
by: stefy | last post by:
I'd like insert null value from a query but i can do it, if my query is : UPDATE table:name UPDATE euro='' WHERE id='5'; i have a sybase message warning like this : Error converting data type...
2
by: Tobes \(Breath\) | last post by:
Hi there, I have some text files saved using a UTF-8 encoding. The "BULK INSERT" statment in Sql Server 2000 is failing with a column length error. Saving the file as ASCII removes the problem....
2
by: eight02645999 | last post by:
hi i am writing a CGI to process some database transactions using the Sybase module. so in my CGI script, i have: .... import Sybase import cgitb; cgitb.enable(display=1 ,...
3
by: Alex Murphy | last post by:
As title, Thanks
0
by: =?ISO-8859-1?Q?S=E9bastien_Sabl=E9?= | last post by:
WHAT IS IT: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. The module is...
3
by: Ultrak The DBA | last post by:
As a converted sybase dba, I have a question. In sybase a command can be executed multiple times by placing a go 1000 at the end of the statement. Such as: insert into a (col1, col2)...
6
by: =?Utf-8?B?TWVs?= | last post by:
I wrote a stored procedure to insert data on Sybase. I need to find code on how to execute the stored procedure from C#. Do you have any examples?
0
by: =?ISO-8859-1?Q?S=E9bastien_Sabl=E9?= | last post by:
WHAT IS IT: The Sybase module provides a Python interface to the Sybase relational database system. It supports all of the Python Database API, version 2.0 with extensions. The module is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.