Find NOT NULLs in a group of 20 columns

Поиск
Список
Период
Сортировка
От gvim
Тема Find NOT NULLs in a group of 20 columns
Дата
Msg-id 4D2BBCF4.8070905@gmail.com
обсуждение исходный текст
Ответы Re: Find NOT NULLs in a group of 20 columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
I'm struggling to find anything other than a complex stored proc to do this:

Out of a group of 20 columns return the rows in which:

1. Only 1 of the 20 columns IS NOT NULL
2. More than 1 of the 20 columns IS NOT NULL

Any ideas?

gvim


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

Предыдущее
От: Jasen Betts
Дата:
Сообщение: Re: pattern matching with dates?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Find NOT NULLs in a group of 20 columns