We are experiencing some problems when executing the next SQL query:
SELECT MAX(Code) + 1 FROM [@OLL1]
This query works fine for the first 10 results, but after the column content is 10 or higher it always returns 10; without adding the +1..
How can we get the next itterated number? Is there any other sql function to use?