LIKE query over multiple fields

Поиск
Список
Период
Сортировка
От Nathan Hand
Тема LIKE query over multiple fields
Дата
Msg-id Pine.LNX.3.96.990107074146.23443A-100000@wookie.chirp.com.au
обсуждение исходный текст
Список pgsql-sql
I'm doing something like the following

   select * from mytable
     where field1 like '%pattern%' or field2 like '%pattern%';

I actually have 60+ fields so I found that the following was more
convenient even though it's not exactly the same.

   select * from mytable
     where (field1||field2) like '%pattern%';

My question is, can this be done in a cleaner way? Something that
works similarly to the first example by preference. I thought

   select * from mytable
     where * like '%pattern%';

Logically described what I wanted, but of course this didn't work
with postgresql (or any other xbase, as far as I can tell).

Please CC: responses to me, if that's convenient. I read the psql
mailing list via an archive which isn't always in sync.


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Jackson, DeJuan"
Дата:
Сообщение: RE: [SQL] Kind of Funny
Следующее
От: "Tim Perdue, The Des Moines City.net"
Дата:
Сообщение: Importing Fixed-Width File?