Home » RDBMS Server » Server Administration » Select Staement Help
Select Staement Help [message #372055] Mon, 08 January 2001 09:31 Go to next message
David
Messages: 110
Registered: November 1998
Senior Member
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,
David
Re: Select Staement Help [message #372056 is a reply to message #372055] Mon, 08 January 2001 10:52 Go to previous messageGo to next message
spdevalla
Messages: 7
Registered: December 2000
Location: Rhode Island
Junior Member
Try like this
SELECT open_num, client, matter, opposing_p FROM lrwhdata WHERE client like
'%" & gWordClientSearch & "%' ORDER BY client;
Re: Select Staement Help [message #372074 is a reply to message #372055] Tue, 09 January 2001 03:53 Go to previous messageGo to next message
GK
Messages: 22
Registered: January 2001
Junior Member
HI THIS SHOULD ALSO WORK TOO GOOD

SELECT open_num, client, matter, opposing_p FROM lrwhdata WHERE INSTR(client,'" &gWordClientSearch & "')>0 ORDER BY client;
Re: Select Staement Help [message #372090 is a reply to message #372074] Tue, 09 January 2001 14:34 Go to previous message
David
Messages: 110
Registered: November 1998
Senior Member
That worked perfect! Thank you all for your help.
Previous Topic: indexs and performance
Next Topic: Equivalent of "Database Link"?
Goto Forum:
  


Current Time: Fri May 17 22:56:50 CDT 2024