If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > Making SQL Query by Using All Possible Combinations of Given Words

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-06-11, 15:31
akrashdi akrashdi is offline
Registered User
 
Join Date: Jul 2011
Posts: 8
Making SQL Query by Using All Possible Combinations of Given Words

Hi,

I have come across a challenge (for me at least) that I need to make an SQL Query by using all possible combinations of typed words to find the right records.

For example, the DB field contains the following:
HILTON WASHINGTON, 1919 CONN AVE., NW, DC., 20009

The user might search for:
hilton conn ave
hilton NW dc
hilton washington
etc.

I wanna to put all possible combinations into SQL query using 'OR' so that the user gets the right result.

Any idea how to implement this or any other good idea for the search criteria will be appreciated..
Reply With Quote
  #2 (permalink)  
Old 10-13-11, 05:01
vishwas vishwas is offline
Registered User
 
Join Date: Jul 2011
Posts: 24
dynamic query

u can do this by procedure and make ur query dynamic.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On