Re: [GENERAL] Constraint allowing value up to 2 times but no more than 2 times

2015-10-12 Thread Jim Nasby
On 10/12/15 1:41 PM, Dara Unglaube wrote: I created a view with the column of interest and a column of the count. How do I do a check constraint on a view or do it all at once as a subquery? Could you provide an example of how to create? Please don't top-post. And do include the mailing list so

Re: [GENERAL] Constraint allowing value up to 2 times but no more than 2 times

2015-10-12 Thread Jim Nasby
On 10/12/15 12:04 PM, Dara Unglaube wrote: 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 function

[GENERAL] Constraint allowing value up to 2 times but no more than 2 times

2015-10-12 Thread Dara Unglaube
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 an