sql server - Using expressions for a value in Paramaters -


i have report returns various products depending on product group select. of these products have similar product codes allow me use operator required results. however, 1 particular product group, have following problem:

vsamples     vsamples2016     vsamples2016dd   vsamplesadd  vsampleset   vsampleslarge    vsampleslargeadd vsamplesnew  

i need top 2 products listed. using 'vsamples% parameter value return of these products.

can write expression parameter value use 'vsamples% , 'vsamples2016% return these 2 products?

edit

the query is:

select strc_code, strc_desc defactouser.f_st_products strc_code @productcode 

i using don't have specify dozens of products each group. 1 parameter value using 'pa.a% works because every product starting pa.a needed. in case of vsamples isn't case.

parameter values follows:

enter image description here

so, can not add value aspire tab return 2 products?

ok, asking might not have been possible. fixed issue altering query.

select strc_code, strc_status, strc_desc defactouser.f_st_products strc_code @productcode , strc_code not in ('vsamples2016dd',  'vsamplesadd', 'vsampleset', 'vsampleslarge', 'vsampleslargeadd',  'vsamplesnew') 

this results in 2 products needed being returned when use vsamples% value.

much simpler thought.

thanks input question asked.


Comments

Popular posts from this blog

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -