insert append to table query

  • I have an existing 2 column table I want to append to from a query.

    I have no identity column to worry about.

    The code I'm using is not working. Any advice on how to do this is appreciated.

     

    insert into _MAWFA_LD_CODES (id, longdescription)

    values (SELECT GIFT.ID, GiftAttributes.TEXT

     FROM GIFT INNER JOIN

                          GiftAttributes ON GIFT.ID = GiftAttributes.PARENTID INNER JOIN

                          RECORDS ON GIFT.CONSTIT_ID = RECORDS.ID)

  • assuming that the select query works, just remove the values keyword and the parenthesis around the query (they are optional).

  • Thanks much guys that did it!

  • HTH.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply