473,394 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Seaching mulitple fields?

Hello,

I need to do a seach in multiple columns for a certain word. With SQL
I have to use one specific column right?

I.E. select * from DB where Column1 like '%search%'

That works.

But what if I want to seach multiple columns in the table for the
search word?

You can't do this:

select * from DB where Column1, Column2, Column3 like '%search%'

Is there a way to do this?

Thanks,

Tmuld.

Jul 23 '05 #1
1 1314
Tmuld,

Try:

SELECT * FROM YourTable
WHERE Column1 LIKE '%search%' OR Column2 LIKE '%search%' ... etc.

-Andy

"Tmuld" <tm******@spliced.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hello,

I need to do a seach in multiple columns for a certain word. With SQL
I have to use one specific column right?

I.E. select * from DB where Column1 like '%search%'

That works.

But what if I want to seach multiple columns in the table for the
search word?

You can't do this:

select * from DB where Column1, Column2, Column3 like '%search%'

Is there a way to do this?

Thanks,

Tmuld.

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ralph Freshour | last post by:
I'm not sure the follow multiple table query is the right way to do what I need to do although it seems to be working: $php_SQL = "SELECT * ". "FROM basics, personal, photos ". "WHERE...
8
by: yasaswi | last post by:
I am using field( substring( product_id, 1, 4 ), 'IR56', '1k09', '7a72', '6f22' ) > 0 in a where clause to select four different strings of same length. However I want to be able to search...
2
by: Martin | last post by:
Hi, I want mulitple html forms on one ASP.Net page. I guess it's invalid HTML to nest form elements, which is okay for me. My concern is that ASP.Net will not work well if I override the...
5
by: Dave H | last post by:
I have an asp:listbox, allowing multiple selections, is there a quick check to see if there's more than one selected, or do I need to go through the whole list? Thanks, Dave
10
by: LittlePython | last post by:
I am have trouble finding a simple working example of using ADO to search Active Directory. I am hoping someone could point me to a generic working script that connects to AD and pulls up a...
2
by: jackson2005 | last post by:
OK, I need to do three different things. On the ONLOAD event I would like a popup box to open. In this popup box I need two text boxes. One for the UserName and one for the BillingTo name. ...
14
by: Del Cagle | last post by:
Developing Quality Mangement DataBase MS Access. Have a form, displays 10 Fields representing 10 different measurements 10 different times a 1 thru 10 on same form drawing from 10 fields in table....
7
by: CheezIt2831 | last post by:
hello, I have 5 tables(Alpha, Bravo, Charlie, Service, Trans). What i am trying to do is be able to select a start date and ending date for a report and include fields from the 5 tables. this is my...
3
by: lynn80 | last post by:
I am trying to set up a search function in Access 2003. Basically I have a table with 3 fields, Sample (e.g "01"), Site (e.g. "457"), and Base (e.g. "A") Sample Site Base 01 ...
14
by: bcap | last post by:
Hello, I really would apprciate help! =) What I want to do is be able to change the status of mulitple records using a drop down and a checkbox. I have a drop down called "ChangeStatus"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.