Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2003

    Unhappy Unanswered: Batch inserts in ASE 12.5

    I am trying to do batch inserts into a table from another source table.

    The source table contains approx 400,000 rows.
    I will have to do an insert into select * only (Doing a regular select into is not possible because of the nature of the job )

    below is my syntax for batch inserts

    while 1=1
    set rowcount 2000
    insert into destination_table
    select a,b,c
    from source_table

    I get the following output
    2000 rows successfully inserted
    and then I get several lines of output saying this...
    "Command has been aborted"

    Why is this happening?

  2. #2
    Join Date
    Jan 2004
    Do you have unique index on the destination_table?

    your sql is inserting the same set of rows (2000) into table.

  3. #3
    Join Date
    Feb 2003

    works now

    You were right. I was inserting the same set of rows everytime.

  4. #4
    Join Date
    Sep 2002
    Sydney, Australia
    If you need a faster method for batch insert... select, post to that effect I will reply
    Derek Asirvadem
    Senior Sybase DBA/Information Architect derekATsoftwaregemsDOTcomDOTau
    Anything worth doing is worth doing Right The First Time
    Spend your money on standards-compliant development or spend 10 times more fixing it

Posting Permissions

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