Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004
    Location
    Dallas, TX
    Posts
    77

    Unanswered: how to write this insert sql statement

    If I have tbl1, tbl2, I want to insert rows into col1 from tbl2, but also another extra column with give value?

    Does anybody know how to write this inser sql statement? Thanks a lot

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    INSERT INTO yourTable (field1, field2, someotherfield)
    SELECT col1, col2, 'your-defined-value'
    FROM tbl2

    If the third value is going to be unique to each row, you will have to iterate through your source dataset and use the INSERT INTO ... VALUES syntax instead.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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