As a relative newb who doesn't have any formal training in SQL programming (or programming in general), I have a question that may be more of an opinion piece for you guys - if I have a section of code, say an 'if...else' which runs maybe 30 lines for either scenario - is it better to build this as a stored proc and call it each time I need to run it or better to type the code in each time? I have maybe ten instances in a pretty massive trigger where I could do this.
I know it would also be a lot easier to change one place, but this was all learned on the fly and I don;t want to rewrite everything if it isn't going to gain us anything outside of being easier to look at.
Thanks.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TheWkndr
Braccae tuae aperiuntur...
I know it would also be a lot easier to change one place, but this was all learned on the fly and I don;t want to rewrite everything if it isn't going to gain us anything outside of being easier to look at.
Thanks.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TheWkndr
Braccae tuae aperiuntur...