|
To: midrange-l@xxxxxxxxxxxx
Subject: RE: Anyone using Triggers to enforce data validation & business rules?
From: rob@xxxxxxxxx
Date: Mon, 22 Sep 2014 08:48:41 -0400
Jim,
Let's assume that you have an email address in more than one table on your
system. Do you really want to repeat that logic in every table? What
happens if you decide to take email validation a step further? Like some
new internet standard comes out and allows you to validate an account
against a domain? Do you want to change all existing logic? Wouldn't you
be better served to do something like:
CREATE TABLE ROB/JIMIT (
MYEMAILADR CHAR (80 ) NULL
CONSTRAINT EMAILADDR CHECK (valideMail( MYEMAILADR )='1' )
)
where valideMail was some UDF?
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.