WildCard Character help

  • I have a query that excepts a input parameter

    ie. where dbo.observations.assigned = @input name

    The query pulls up audit observations that are opened or pending. Observations can be assigned to more than one person for example  Warner/ Cinder.

    When I input the name Warner I only get observations that are assigned to Warner alone. I need to get all the observaton that include everything that has Warner in it

    How can I use a wildcard character? I've tried [&input name%] that doesn't work

     

    Thanks in advance for your help

     

    -WM

  • We need more information. Does you column actually contain "Warner/Cinder" or is that in multiple records?  Also, what is the code passing in your parameter?  You may actually need to add the wildcard: @InputParmater = @InputParameter " '%' 

     

    I wasn't born stupid - I had to study.

  • The actually colum contains that value Warner / Cinder

    The code is passing the name entered into a dialog box. When the report is run a dialog box ask for a name then any open observations assigned to that person are displayed. The issue is that more than one person can be assigned to an observation. When I input a name I need it to pick up all observations assigned to that person and observations assigned to that person along with somone else.

     

    -WM

  • Okay.  First off, I forgot to add the plus sign:  @InputParameter = RTRIM( LTRIM( InputParamter) + '%'

     

    When you pass in Warner/ Cinder, do you get all of the values you desire?  If not, we are going to need table structures and relationships, dummy data, and the code you are using to retrieve this data...  If you are getting all of the values you need, then it may be as simple as working through how to add a wildcard to you input parameter...

     

    I wasn't born stupid - I had to study.

  • Farrell thanks for your help

    Solution LIKE N'%'+ @ input name + N'%'

    P.S. This was for an microsoft Access ADP project

    Thanks again

    -WM

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply