I have a report/stored procedure working that will allow me to enter one value in the the parameter and the SP will use that to pull all record where the data is 'equal' to that value. For example, in Crystal, I'm prompted to enter a a value for @MtgCode. If I enter MTG1 for @MtgCode, the stored proc uses that in the select stmt:
Select * from Meeting where CODE=@MtgCode
That's fine, but what I really need is to be able to enter one or many meeting codes and have the select stmt work with an 'in' statement. For example, in Crystal, for @MtgCode I'd enter MTG1, MGT2, MGT3 and the select stmt would be:
Select * from Meeting where CODE in ('MTG1','MTG2','MTG3')
What is the syntax to get this to work this way? The following gives me an error:
Select * from Meeting where CODE in @MtgCode
Thanks.
Anna Jaeger
iMIS Database Support
Select * from Meeting where CODE=@MtgCode
That's fine, but what I really need is to be able to enter one or many meeting codes and have the select stmt work with an 'in' statement. For example, in Crystal, for @MtgCode I'd enter MTG1, MGT2, MGT3 and the select stmt would be:
Select * from Meeting where CODE in ('MTG1','MTG2','MTG3')
What is the syntax to get this to work this way? The following gives me an error:
Select * from Meeting where CODE in @MtgCode
Thanks.
Anna Jaeger
iMIS Database Support