DavidPike
Programmer
- Oct 9, 2007
- 18
How does one construct a callable function within a stored proc? For instance, if I had a block of code that turned on the lights and there were three places in my proc that I wanted to turn the lights on I would not want to have the same code in three place. This is old programming 101 stuff but I don't know how to do it in a transact SQL proc. I can use GoTo with lables but it seems very clumsy...for instance, it does not handle going back to where you came from in any tidy way I can determine.