Using static SQL and not Dynamic SQL.
I'm thinking somehow someway a case statement would be used. I was able to get this inner join to work for me. However I'd prefer a case statement that would avoid this little trick I deployed. Any help would be greatly appreciated. Thanks
INNER JOIN @Statetbl Ts ON OM.propState = CASE WHEN @State <> 'ALL' THEN Ts.State ELSE OM.propState END
Steve
I'm thinking somehow someway a case statement would be used. I was able to get this inner join to work for me. However I'd prefer a case statement that would avoid this little trick I deployed. Any help would be greatly appreciated. Thanks
INNER JOIN @Statetbl Ts ON OM.propState = CASE WHEN @State <> 'ALL' THEN Ts.State ELSE OM.propState END
Steve