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

Select Statement Search Help

Status
Not open for further replies.

dgirard

Computer
Joined
Jan 8, 2001
Messages
1
Location
US
Hello,

I don’t know if this is possible but if anyone knows how to do this I would appreciate any help I can get. I need to create a select statement for my visual basic program that if the user enters a word such a "Business" it will find any company with the word "Business" no matter where the word ‘Business” falls. So it will find for example "Business Solutions", "Technical Business", Complete Business Solutions, and ect. My select statement current looks like this:
SELECT open_num, client, matter, opposing_p FROM lrwhdata WHERE client = '" & gWordClientSearch & "%' ORDER BY client;

Thank you
 
hi,
it is very simple use the following in your where clause
WHERE <field> LIKE &amp; &quot;&quot;&quot; &amp; &quot;*&quot; &amp; gWordClientSearch &amp; &quot;*&quot; &amp; &quot;&quot;&quot;;
incase of Access table use as it is. in case of Oralce database use % instead of *. the menaing is you are searching for the word Business followed and preceed by any or no occurance of any letter.

Oracle provides extended features on select statement. where it has a clause called SOUNDS LIKE. using this clause you can find fields which has the word of similar sounds with various possible spellings.

if you have further doubts, please feel free to contact me over mail at biosraman@chequemail.com
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top