473,386 Members | 1,766 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,386 software developers and data experts.

How to text Search across all Columns

Can some tell me of a syntax to search for a text string that might be
in any column in a table. Something simular to:

SELECT * FROM mycontact WHERE * LIKE 'string';

Thanks in advance for any suggestions or comments.

-- L. James
--
--------------------------------
L. D. James
lj****@apollo3.com
www.apollo3.com/~ljames
Jul 23 '05 #1
3 19885
tom
On Wed, 25 May 2005 07:01:01 -0400, L. D. James wrote:
Can some tell me of a syntax to search for a text string that might be
in any column in a table. Something simular to:

SELECT * FROM mycontact WHERE * LIKE 'string';

Thanks in advance for any suggestions or comments.


WHERE CONCAT(field1, field2, ... fieldn) LIKE 'string';

Don't expect this to be particularly fast.
Thomas Bartkus
Jul 23 '05 #2
L. D. James wrote:
Can some tell me of a syntax to search for a text string that might be
in any column in a table. Something simular to:

SELECT * FROM mycontact WHERE * LIKE 'string';


select * from mycontact where field1 like 'string' or field2 like
'string' or field3 like 'string' ...
Jul 23 '05 #3
"Aggro" <sp**********@yahoo.com> wrote in message
news:jN***************@read3.inet.fi...
L. D. James wrote:
Can some tell me of a syntax to search for a text string that might
be
in any column in a table. Something simular to:

SELECT * FROM mycontact WHERE * LIKE 'string';


select * from mycontact where field1 like 'string' or field2 like 'string'
or field3 like 'string' ...


Thanks, Guys. I was hoping to have a cleaner method for the 93 fields.

The reference works fine.

-- L. James
--
--------------------------------
L. D. James
lj****@apollo3.com
www.apollo3.com/~ljames
Jul 23 '05 #4

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

Similar topics

4
by: dave | last post by:
I am wondering if the following can be done. I want to setup a search page that utilizes full text searching in sql2000. I want the user to type in say "where is bill" and have the query search...
1
by: Nikola Pecigos | last post by:
Hi, I have the following problem: We have an Oracle 9.2 with one table "document" which contains a path to the filesystem. If I want to index these files (HTML, PDF, World, Excel, etc.), I...
1
by: John | last post by:
Hello, We are developing an application against an MS SQL Server 2000 database which requires that we implement full-text searching across columns in multiple tables. The research that we have...
0
by: Savvas | last post by:
Hi, I am using VB.Net 2005 for a windows application. The application was actually upgraded from vb.net 2003. I have a search field which is used as a parameter to search all datagrid...
14
by: Simon Gare | last post by:
Hi, have a search.asp page with results.asp page drawing data from an SQL db, problem is the user has to type the whole field value into the search box to retrieve the value on results.asp, what...
0
by: Skywick | last post by:
Hi I am trying to do a full text search with a column name for the search term. I can do this using LIKE with: SELECT tblContent.ID FROM tblContent INNER JOIN #keywords ON tblContent.words...
2
by: John Kotuby | last post by:
Hi all, Maybe this belongs in the Full Text group but I am writing an ASP.NET application with a SQL Server 2005 backend, so I am posing the question here. I have been using fulltext search...
8
by: Sham | last post by:
I am trying to perform the following query on a table that has been indexed using Full Text Search. The table contains multiple columns than have been indexed. (Below, all xml columns are...
0
by: JamesOo | last post by:
I have the code below, but I need to make it searchable in query table, below code only allowed seach the table which in show mdb only. (i.e. have 3 table, but only can search either one only,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.