Question for you (all):
Won't the "ROLLBACK TRAN" rollback the "SELECT @output_message ="
I would expect that, if you set a variable inside a transaction, then rollback the transaction, the variable would be rolled back as well. Am I missing something?
What happens when you get to "AAAZ" and want to add 1? Do you go to "AAAa" or "AABA" or "AAA0" or what? You need to be more specific still.
I don't recognize the "{ fn WEEK(hit_date) }" part of the code... but I'm mostly 7.0...
In SQL 7, you can get away with it by adding a leading zero for weeks that are 1 character. If fn WEEK is a function, you could try changing that so it adds a leading zero if necessary.
That...
Just a little warning about triggers:
If you insert to a table and generate a new Identity, but that insert fires a trigger that makes another insert on another table with an identity, the @@IDENTITY value you get back right after the first insert will actually be from the insert fired by the...
SQL seems to hate doing math. However - the INT solution is the wrong direction. If you want it to keep the ".3" part of "1.3", you need to use a non-INT numeric field.
The NUMERIC datatype holds precision and scale. The books online will describe this better than I, so...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.