Results 1 to 2 of 2

Thread: Insert select with order by

  1. #1
    Join Date
    Feb 2003
    Posts
    4

    Insert select with order by

    I am trying to execute this:

    insert into Table1 (Field1,Field2,Field3)
    select sequence1.nextval,Field4,Field5
    from Table2
    where Field6='Something'
    order by Field7

    I want row from Table2 to be inserted in Table1 in a specific order.

    It is not working. I have tried whitout the sequence but it doesn't work.

    It is a query executed from a Visual Basic application, but i can't make a procedure right now, there isn't enough time to make it and change everything.

    Thank you.

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    What's the error you get?

    Can you do the same from SQL Plus?

Posting Permissions

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