I realise that this must be a very basic question, but my google-fu seems to be entirely absent at the moment.
What I want to do is, inside a stored procedure:
- Declare a VarChar(1) variable, myVarChar
- Search a table for the value of a corresponding VarChar(1), based on an incoming @myKey argument to the stored procedure, and assign its value to myVarChar
- Perform one of two different Insert statements depending on the new value of myVarChar
As I say, I’m sure this must be quite straightforward, and I apologise for that, but I’m just not seeing the information I want in my searching.
Is this what you are looking for?