I’d like to have something similar to a C++ integer constant that I could use across different stored T-SQL procedures:
SELECT * FROM SOMETABLE WHERE STATE = IsBeingProcessed;
with IsBeingProcessed being a named integer constant equal to say 4.
Is it possible in T-SQL?
You could create a
User Defined Functionin themastertable which simply does the following:Then this could be called like: