Stewart "Arturius" Campbell (5/27/2014)
Raghavendra Mudugal (5/26/2014)
Stewart "Arturius" Campbell (5/26/2014)
...as I could not get it working using T-SQL.
.. you mean, the auto insert?
that's the one...
(not trying to sound extreme smart here..)
actually, I have done this in MSSQL 2000 database. The code was in the Trigger. Say, in one particular grid, where we can add more than 20 rows in the FE and then submit the page, it writes the data to the table and for each row, I need to generate a custom format unique code, some thing like this "APETE/32434/1/PO/2313-A" and I wrote the code in the trigger to take the next available number for "APETE" and increment by 1 or if "APETE" is being used for the first time, then insert, and get next number, all using plain T-SQL and update the data in the #inserted table and then reflect it to the main table.
you were using 2008, it must be possible, or was there any other issue apart from T-SQL?
(just a normal curiosity to know what could have gone wrong 🙂 )
The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.