Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2013
    Posts
    2

    Unanswered: Export table for one database to another in Sybase ASE

    Hi
    I want to export table (with data) from one database to another in Sybase ASE server.
    - I know we can use 'SELECT INTO' to move the data, but this will just move the data. I need to create the table on the target database with table structure (DDL) as source.
    - I could find DDLGEN utility provided by Sybase to get DDL of a table. But the content provided by DDLGEN will have source database references (It will have source database name and user information ) .
    - I'll have to manually parse the output file provided by DDLGEN to replace SOURCE database name with TARGET database name. Its there a way to avoid it ?

    Thanks
    Girish

  2. #2
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    Select into doesn't just move the data, it simultaneously creates a table with the exact structure of the original.
    Try select into db2..tablename from db1..tablename.
    I'm not crazy, I'm an aeroplane!

Tags for this Thread

Posting Permissions

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