Results 1 to 11 of 11
  1. #1
    Join Date
    Jul 2013
    Posts
    15

    Unanswered: load data from CSV via command line

    Hi, I simply need to load a CSV file into a new table I created on our Sybase database. I have tried all methods I was able to find online, and keep getting errors. Please help!


    1> LOAD TABLE cb_tradeTEST
    2> FROM '/opt/sybase/ETMM/CB_TRADE.csv'
    3> go
    Msg 156, Level 15, State 2:
    Server 'SybaseServer', Line 1:
    Incorrect syntax near the keyword 'TABLE'.
    1> LOAD TABLE 'cb_tradeTEST' FROM '/opt/sybase/ETMM/CB_TRADE.csv'
    2> go
    Msg 156, Level 15, State 2:
    Server 'SybaseServer', Line 1:
    Incorrect syntax near the keyword 'TABLE'.
    1> LOAD TABLE "cb_tradeTEST" FROM '/opt/sybase/ETMM/CB_TRADE.csv'
    2> go
    Msg 156, Level 15, State 2:
    Server 'SybaseServer', Line 1:
    Incorrect syntax near the keyword 'TABLE'.
    1> INPUT INTO "cb_tradeTEST" FROM '/opt/sybase/ETMM/CB_TRADE.csv'
    2> go
    Msg 156, Level 15, State 2:
    Server 'SybaseServer', Line 1:
    Incorrect syntax near the keyword 'INTO'.
    1> INPUT INTO cb_tradeTEST FROM '/opt/sybase/ETMM/CB_TRADE.csv'
    2> go
    Msg 156, Level 15, State 2:
    Server 'SybaseServer', Line 1:
    Incorrect syntax near the keyword 'INTO'.
    1> INPUT INTO Employees
    FROM /opt/sybase/ETMM/CB_TRADE.txt
    FORMAT TEXT;2> 3>
    4> go
    Msg 156, Level 15, State 2:
    Server 'SybaseServer', Line 1:
    Incorrect syntax near the keyword 'INTO'.

  2. #2
    Join Date
    Jul 2013
    Posts
    15
    Please help as soon as possible

  3. #3
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    This is not Sybase ASE Syntax - Use command line bcp in OCS-15_0/bin directory.
    Else which Sybase database product are you using ASE/IQ/SQLAnywhere?
    Last edited by pdreyer; 08-01-13 at 09:12.

  4. #4
    Join Date
    Jul 2013
    Posts
    15
    I was not using SQL Anywhere, but just setting the environment directly and Linux and using isql.

    export the path:
    SYBASE=/opt/sybase
    PATH=$PATH:/opt/sybase/OCS-15_0/bin
    export SYBASE PATH

    sql -U etmm_owner -S SybaseServer -D etmm

  5. #5
    Join Date
    Jul 2013
    Posts
    15
    I am attempting to load a csv file from Oracle into a new table I created on our Sybase database

  6. #6
    Join Date
    Jul 2013
    Posts
    15
    I got the commands from here Import data with the INPUT statement

  7. #7
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    No, it appears you are using Sybase ASE
    Sybase SQL Anywhere is a different product from Sybase ASE
    Same as MS SQL Server and Sybase ASE are different products
    You'll have to use bcp to import the data into ASE

  8. #8
    Join Date
    Jul 2013
    Posts
    15
    OK, Ill take your advice
    Last edited by stephDBA; 08-04-13 at 02:26.

  9. #9
    Join Date
    Jul 2013
    Posts
    15
    please disregard thanks for your advice. we are working on it
    Last edited by stephDBA; 08-04-13 at 02:27.

  10. #10
    Join Date
    Jul 2013
    Posts
    15
    please disregard
    Last edited by stephDBA; 08-04-13 at 02:28.

  11. #11
    Join Date
    Jul 2013
    Posts
    15
    please disregard
    Last edited by stephDBA; 08-04-13 at 02:26.

Posting Permissions

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