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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi Valued Parameter and Parameter in Select expert using Like

Status
Not open for further replies.

poujor

Instructor
Dec 18, 2002
43
0
0
DK
Hi

I'm having some problems (applies to version 9 and 10)
I have a parameter {?types} and want it to be multiple distinct values.
In the Select Expert I specify:
{tablename.field} LIKE {?types}+'*'

If I specify MS and BC as values for the {?types}, I want it to return all records where {tablename.field} starts with ms or starts with bc. Only it effectively returns all records for any value of {tablename.field}

Looking at the 'Show SQL Query' then Where part is:
("tablename"."field" LIKE N'%' OR
"tablename"."field" LIKE N'ms'OR
"tablename"."field" LIKE N'bc')

I'm trying to get it like:
("tablename"."field" LIKE N'ms%' OR
"tablename"."field" LIKE N'bc%')

Any suggestions?
 
Can you post the where clause from the record selection formula?
 
Hi danausten

Below example is when giving the {?types} parameter the two distinct input values of
ms
and
bc

The Where Clause seen from 'Show SQL Query' is
("tablename"."field" LIKE N'%' OR
"tablename"."field" LIKE N'ms'OR
"tablename"."field" LIKE N'bc')

What I specified from the 'Select Expert' (The same as the Record selection formula) was
{tablename.field} LIKE {?types}+'*'
 
I solved the problem myself.
I went from {tablename.field} LIKE {?types}+'*'
to {tablename.field} startswith {?types}
in the record selection
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top