Results 1 to 4 of 4

Thread: INSERT INTO table SELECT... [Resolved]

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    INSERT INTO table SELECT... [Resolved]

    Hello...

    I have two tables, one of them has only one field less than the other.
    Table tblInvoiceOrderFileList has an extra ID as the first field, and the other does not.

    I want to copy all records from table tblInvoiceOrdersTodayList and insert into tblInvoiceOrderFileList but with that extra ID.

    In the table tblInvoiceOrdersFileList all records that I moved (at that time) will have the same ID in that extra field, and it will increment when I move the other set of records... so each set of records have different ID.
    Basicly table tblInvoiceOrdersTodayList is like a queue and once a day they get moved, and the extra ID is attached to them.

    I hope you got what I want...

    This is what I attempted, but it did not work of course... I get a syntax error

    INSERT INTO tblInvoiceOrderFileList VALUES(1, SELECT * FROM tblInvoiceOrdersTodayList)

    Does anyone know how to make this work ? thanks...
    Last edited by CVMichael; Feb 17th, 2004 at 12:03 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width