I've put in validation logic into the RPG maintenance application but I'm
afraid of someone entering invalid data using DFU, SQL, Excel or some other
method.
I'd like to know if it's possible to put some business logic into a table
constraint or what's the best method. I'm thinking an update trigger would
be my second choice.
Table: SIZEGRP
---------------------------------------------------
group CHAR(4) not null
size NUMERIC(4,0) not null
preference NUMERIC(2,0)
Business rule: Preferences in a group must either be all null or all not
null.
Based on this rule, the table should not allow either of these two rows:
0001 14 1
0002 14 -
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.