Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004
    Location
    Mansfield, OH
    Posts
    22

    Unanswered: Import into ASA7 from a csv file

    I am trying to use the import utility within Interactive SQL to populate a table from a csv file. For some reason, nothing is being imported. I believe the escape character is wrong, but I'm not sure.
    If there is another way, any help would be appreciated. Thanks in advance.

  2. #2
    Join Date
    Sep 2004
    Posts
    0

    Another way could be ...

    Hi,

    another could be .writing a little prog in php which makes the imports and conversion automatically via odbc ...

    the global algo :
    ___________________________________________
    open persistent connection with your csv
    then open persistent connection with your sybase

    list the fields of the first ( with attributes of course ;-)
    create the fields in the second

    then start copiing line by line

    close all the connections
    ____________________________________________

    i recommand you to make that step by step with VISUAL control points

    u must know the php and odbc functionnement of course ...

    PHPDem

  3. #3
    Join Date
    Sep 2004
    Location
    Mansfield, OH
    Posts
    22

    Thumbs up

    Took a while, but I found the answer. I seems that there is a 'LOAD TABLE' command that works great as long as 2 conditions are met.

    1. The table is already created with the appropriate columns.
    2. The data in the csv file are in the same order as the database columns.

    The all it takes is: LOAD TABLE <tablename> FROM <path and filename>

Posting Permissions

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