Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi value parameter running a stored procedure.

Status
Not open for further replies.

ajaeger

Technical User
Feb 6, 2003
201
US
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')

Is this possible to do this way? I need to do a bunch of other stuff in the Store Proc after I get the records from this select stmt.

Thanks.

Anna Jaeger
iMIS Database Support
 
I think it should work this way.

-------------------------------------------------------------------------------------------------------------------------
"Now I can look at you in peace; I don't eat you any more." Franz Kafka, while admiring fish in an aquarium
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top