Select Statement Search Help
Select Statement Search Help
(OP)
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
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





RE: Select Statement Search Help
it is very simple use the following in your where clause
WHERE <field> LIKE & """ & "*" & gWordClientSearch & "*" & """;
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