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

  • you will need to break the logic out into seperate steps

    1. define a variable to hold the value,

    2. select the max(incomekey) into this variable.

    3. use this variable in your insert statement

    one issue you will have when using this approach for incrementing keys, is that if two or more requests are happening at the same time there will be a possibility of dupliacate keys occuring.