I'd use a semicolon between the first and the second SQL statementNo semicolon needed between statements with MS-SQL, and in fact the semi-colon would be a syntax error with Sybase.
...a dirty and bad looking solution is to have a separate statement MAX() the value of the identity...Unless you use a transaction around the insert and the select max() (which effectively single threads inserts) then there is no guarantee that the max() will be the value that you just inserted (unless of course you know that you are the only process inserting data to that particular table).
Michael
In reply to Re: Re: Re: mssql query
by mpeppler
in thread mssql query
by Becky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |