Hi micheal,
Just wondering ; is this 'SQL server' code or still standard SQL code ? In other words, will this work on other databases ?
>There's a cleaner way. You can use UPDATE to increment and fetch the value without have to explicitly manage the locks:
>
>UPDATE id
>SET @nnid = idval, idval = idval + 1
>WHERE keyname = @tcKeyWord
>
>-Mike