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

Wild card input queries

Status
Not open for further replies.

Rovent

Technical User
Nov 16, 2001
61
US
I was wondering if anyone has been able to pull off a certain query, something like this:

I can get SMS to prompt for a value, and return specific matches

WHERE prod.ProductName= ##PRM:SMS_G_System_SoftwareProduct.ProductName##

And I can set up the search for anything with, let’s say, the word Oracle in the result

WHERE prod.ProductName like “%oracle%”

But has anyone figured out a way to search for anything that has the user-input in it? Something like :

WHERE prod.ProductName like “%##PRM:SMS_G_System_SoftwareProduct.ProductName##%”

(the above errors out, saying it can’t search for “%”oracle”%”)

Whenever I use the ##PRM##, it invariably looks for a specific match, so I have to enter something like “Oracle Information Navigator for Windows” for the input to get the results. I’d like to just type “Oracle” and get the same thing.

thanks!

- Alex
 
I am trying to to the same as Rovent, but I do not think that you have answered his question.

Basically, I have a query that prompts, and i can search using wildcards ie %ba%, but I need it to add the "%" automatically either side of the search string, so by entering ba into the prompt, the query will look for %ba%.

Many Thanks,

Ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top