Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL in constraints II
Mark Gumbs schrieb:
>
> We have a table with a date range on it i.e. start and end dates. We want
> to make sure that for any particular person (EMPNO???) that the date ranges
> entered do not overlap those of any existing records.
>
> How best to implement this?
>
> We thought
>
> a) constraint, but you can't put SQL in it.
> b) database trigger. This would give us a mutating table though, we
> suspect as we need to query the table being inserted (or updated) into.
Not necessarily:
SELECT
field
FROM
TABLE t
WHERE
t.rowid != :new.rowid
;
may do well.
> c) application (Forms) code. This will work but we'd like the extra
> safety net of testing at the server level also.
>
HTH
Matthias
--
grema_at_t-online.de
Protect privacy, boycott Intel: http://www.bigbrotherinside.org Received on Fri Mar 05 1999 - 01:08:15 CST
![]() |
![]() |