Hi,
Are you looking for something like this?
the select query should return only one record.
CREATE PROCEDURE SP_name (it doesn't really start with SP_)
@variable_1_from_CRM varchar(13),
@variable_2_from_CRM varchar(10),
@variable_3_from_CRM char(13),
@variable_4_from_CRM char(10),
@flag varchar(1) output (also...