Clark Christensen <cdcmicro-/[EMAIL PROTECTED]>
wrote:
I have a table, as described below, where I need to find out if the
tech_id in question has at least some modules in a particular
collection (coll_id), and they're all complete.

select coalesce(min(is_complete), 0) from tech_modules
where tech_id=? and coll_id=?;

This returns 0 if there's at least one record with is_complete=0 (min will select it), or if there are no matching records at all (min will produce NULL, coalesce will convert it to 0).

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to