Home Forums SQL Server 7,2000 General Insert statement not working - require scalar expression RE: Insert statement not working - require scalar expression

  • the issue is to NOT use the INSERT...VALUES syntax, but INSERT...SELECTinstead:

    insert into sbsincome (incomekey,flightkey)

    select

    MAX(incomekey)+ 1 AS incomekey,

    116040 AS flightkey

    from sbsincome

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!