471,049 Members | 1,430 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,049 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 19777
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Savvas | last post: by
14 posts views Thread by Simon Gare | last post: by

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.