Solved

Search with +

Posted on 1998-09-23
4
229 Views
Last Modified: 2010-03-19
If I want to use "+" in search function (t.ex USA + Job), how can I do??
0
Comment
Question by:ruisun
4 Comments
 
LVL 7

Expert Comment

by:spiridonov
ID: 1090230
Could you explain more details
0
 

Author Comment

by:ruisun
ID: 1090231
Thank U for U answer the question!!
It is like this: I think I know how to search in a table "SELECT * from Name Where columname=Keyword"
But now I want that I can search in a table not just by one keyword , but by two. or more
T.ex. I want to search something match two keyword by writing: keyword1 + keyword2  in the search form  Like I do it in "Yahoo", I want to know how can I write script??  
0
 

Expert Comment

by:manish77
ID: 1090232
ARE YOU LOOKING FOR PARTIAL SEARCH ON BOTH KEYWORDS??
0
 
LVL 2

Accepted Solution

by:
formula earned 50 total points
ID: 1090233
Using your one keyword example, here are some other options:

 Your example: SELECT * from Name Where columname=Keyword
1) select * from Name where columnname="Keyword1" or
   columnname="keyword2" (returns records where columnname is
                          keyword1 or keyword2)
2) select * from Name where columnname in ("keyword1","keyword2")
   (Same as 1)
3) select * from Name where columnname like "%keyword1%" or
   columnname like "%keyword2%" (Columnname contains keyword1 or
                                 keyword2, but not both)
4) select * from Name where columnname like "%keyword1%" or
   columnname like "%keyword2%" (Columnname contains keyword1
                                  and keyword2)
5) select * from Name where columnname like "%keyword1%keyword2%"
   (Contains keyword1 and keyword2 in that order)
6) select * from Name where columnname like "%keyword2%keyword1%"
   (Contains keyword2 and keyword1 in that order)

It hope this gives you the choices you need. If not send more
specific info on your problem.


0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how the fundamental information of how to create a table.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question