Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6329051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:34:35+00:00 2026-05-24T17:34:35+00:00

I have a parameter called VoucherType that can multiple values selected by the user

  • 0

I have a parameter called VoucherType that can multiple values selected by the user at run time. There’s a field within the table called Voucher that starts with the VoucherType and ends with a sequence of numbers that I don’t care about. For example:

VoucherTypes

  • MKE
  • ORD
  • LAX

Vouchers

  • MKE-3849284
  • MKE-4173942
  • ORD-1654951
  • LAX-8798484

The SQL query I have to start looks like this:

SELECT VOUCHER, COST
FROM VOUCHERDATA
WHERE VOUCHER LIKE @VoucherType + '%';

However, it does not support the user selecting multiple values. When they attempt to select multiple values, they get this message:

Query execution failed for dataset ‘Dataset1’. Incorrect syntax near ‘,’.

I’m sure this is because @VoucherType is now a comma delimited list, but I have no clue how to handle it.

Any help would be appreciated, thanks!

**Note: Table changes are not feasible due to outside constraints.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:34:38+00:00Added an answer on May 24, 2026 at 5:34 pm

    There are 2 things you can do in this instance.

    First of all you are correct, it is not accepting it because it is now a comma seperated list.

    Basically what you need to do is parse out that comma seperated list and use a function with an IN clause in your main query. Here’s a very good article explaining how to do this:

    http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/ssrs_multi_value_parameters

    Otherwise another method would be to return everything in your SQL code and filter on the SSRS side. The way to do this would be to remove your where clause in SQL which filters your vouchers. This will then bring back all vouchers. In SSRS then set up a parameter the same way you normally would for a multi select parameter. Then in SSRS design view, you right click your table and go to properties. There is then a tab called filters. You can set up the filter here by saying do not show these vouchers. Basically it hides them.

    The first way I explanined is definitely the best way to do it as it is faster and can be re-used in the long run. It is very simple once all the function are setup.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application I have a string parameter called shop that is required in
Say I have a model called User that has the following parameters: favorite_color, favorite_animal,
I have a stored procedure that has a parameter called UserName and in my
Say I have a web application that accepts a parameter called content. Whatever is
I have a function that gets called with a parameter called name now it
I am writing a stored procedure where I have an input parameter called my_size
I have a DataGridView and handle event CellFormatting. It has a parameter called: DataGridViewCellFormattingEventArgs
I have a function called Colorbox (jQuery plugin) that takes a number of parameters
How can I have a parameter to one JS function be Function Name with
Assuming that you already have created an oauth client app in twitter, you can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.