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

Partial match of data in vbscripts

Status
Not open for further replies.

VBinQTP

Technical User
Dec 10, 2008
2
US
hi,

Can any one help me how to find a partial match of a string.
let me inform you cannot know what is the pattern you r searching and in which one.

I am accessing a database and get all the business names.
now i have to find exact match and partial match for all these business names in a table.

query ="SELECT BUS_NME FROM LOOK_MATCH WHERE BUS_NME like '" &a(i) &"'"
Here a(i) is business name
this is giving me the exact match.

similarly how will i find partial match.

eg: for first time business name a(0)= AMC software
this name should be checked with every entry in the LOOK_MATCH table and if partial match then return the match.
similarly a(1)etc...
 
You could include wildcards e.g.
Code:
query ="SELECT BUS_NME FROM LOOK_MATCH WHERE  BUS_NME  like '%"  &a(i) &"%'"
Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Hi Harley,

Thank you for the response i would implement and let you know how it works.

Thanks once again

Regards,
shwetha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top