Syntax error

  • I am trying the following statement:

    insert into tblStudent_Sponsor(intStudentID, intSponsorID)

    values

    select distinct studentid,sponsorid

    from tblContractRates

    and I am getting:

    Server: Msg 156, Level 15, State 1, Line 3

    Incorrect syntax near the keyword 'select'.

    I am sure this is a brain-freeze

  • insert into tblStudent_Sponsor(intStudentID, intSponsorID)

    select distinct studentid,sponsorid

    from tblContractRates

    remove values, for futher details refer the BOL




    My Blog: http://dineshasanka.spaces.live.com/

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

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