Results 1 to 3 of 3

Thread: Bcp

  1. #1
    Join Date
    Jan 2004
    Posts
    23

    Unanswered: Bcp

    I don't much in SYBASE, but got problem to solve.

    I've one flat file as :

    A,B,C,12/12/03

    where last field has date but in varchar form.

    I need to upload this data into the table

    How should I write BCP ?

    Can any one suggest me whole syntax ?

  2. #2
    Join Date
    Feb 2004
    Location
    India
    Posts
    12
    Try this,

    bcp databasename.owner.tablename in Flat_filename -c -t ',' -r '\n' -U DB_username -P Password -S ServerName

    Note:
    * If the table does not already exist, then create the table.
    * Since the flatfile has 4 columns, the table will have only 4 columns

    Thanks.
    Pat

  3. #3
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    Also, make sure the columns in the table are the right datatype.
    Watch for integer/char-conversions that cause an arithmic overflow and such things.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •