Subject What is the best way to find if THREE or more records exists
Author kaczy27
Hi,

this is related to the previous thread where Michael L. Horne was
looking for a single existing record.

I have a table where records are linked to the record in other table
(standard one-to-many relation).

I need to find out during delete, if there are more then x other
records remaining, and if no, than delete the parent record with all
remaining siblings.

for now I am doing it like this:
check if count(1) is more then 3 if true, delete the record, if no
delete the parent and let the cascase delete do its stuff.

is there any better way? something like "count the records until you
reach the minimal value"?

CUIN Kaczy