I have an issue where I have a Bill of Material list of items where some of the item numbers are blank. I need to give them sequential numbers from a beginning number like 9000000. then the next blank would be 9000001 and so on. I thought I could create a table and store the number and increment it using a function because I need the function to return other item numbers based on the item number. But when the item number is blank, I am screwed because a function can't update a table. and a stored procedure can't return a value. Any ideas would be appreciated.
Thanks