Solved

Search with +

Posted on 1998-09-23
4
220 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

762 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now