stored procedure vs UDF
- by TheObserver
I have a select statement and in a couple of the fields, I want to check if an entry for the record exists in another table and if it does, output 1 value and if it doesn't, provide another value.
What would be the best way to do it? When would you use a stored procedure and when would you use a UDF?