Constraint allowing value up to 2 times but no more than 2 times

Поиск
Список
Период
Сортировка
От Dara Unglaube
Тема Constraint allowing value up to 2 times but no more than 2 times
Дата
Msg-id CA+ca-rquDV-=ytRoBi6KM-v=w-78YS7piT+jOeCkyZRiHa-R6g@mail.gmail.com
обсуждение исходный текст
Ответы Re: Constraint allowing value up to 2 times but no more than 2 times
Список pgsql-general
Greeetings.
I'm trying to come up with a way to allow one column to have the same value up to two times, but no more than two times. I attempted adding a constraint to check the count of the value in the field  - count (trsqqq) <=2 but aggregate functions are not allowed in constraints. Is there another way to do this? Any help would be greatly appreciated.
Thanks in advance.
Dara

--
Dara J. Olson Unglaube
Aquatic Invasive Species Coordinator, Spatial Database Manager
Great Lakes Indian Fish & Wildlife Commission
P.O. Box 9, 72682 Maple Street
Odanah, WI 54861
(715) 682-6619 ext.2129

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

Предыдущее
От: Steve Pribyl
Дата:
Сообщение: Re: BDR workers exiting?
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: Constraint allowing value up to 2 times but no more than 2 times