insert statement syntax

  • I would like to add records to table AppointmentContact using a subquery as well as pass in a value for ContactID. THis is what I have so far:

    INSERT INTO dbo.AppointmentContact (

    AppointmentID, ContactID )

    (SELECT a.AppointmentID

    FROMdbo.Appointment a

    WHERE

    a.AppointmentTypeID=3

    AND

    a.SelectToFax = 1

    AND

    a.PartyID = 39546)

    )

    How can I do this?

    Thanks,

    Sam

  • sorry for the trouble. I got it by adding the value in the select statement. Thanks

Viewing 2 posts - 1 through 1 (of 1 total)

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