I have been reading a lot today trying to figure out a way that I can setup
a check constraint for a 3a column in a table to reference a control file
that holds all the fields valid (allowed) values.

The control file has been around for years used by edit routines in RPG. It
has a key field that groups the records together. Then there is a values
field which holds the valid values. I would need to hit the file for a
certain group value in the key field then check if the value being inserted
into my table is found in the control file under that goup. The control
table has no "primary" keys. So setting up a foreign key constraint is
unsuccessful. Regardless, in a FKC there would be no way to specify the
group key value.

My goal is to be able to keep all of the valid values for validation in
this control file to ensure that I do not disturb existing processes and to
have one point in which to update them. I have tried setting up a check
constraint that does a subselect but I quickly learned that is outside of
the scope of a check condition.

Has anyone else tried to do this same thing before with any success?
Can you offer any insight on how I may accomplish this?

Thanks in advance,
Robert Newton
EDPS
Electronic Data Processing Services
Software Engineer
rnewton@xxxxxxxxxxxxxxxxx

This communication is confidential and is intended to be privileged. If
there is a problem with this transmission, please contact the sender. If
the reader of this message is not the intended recipient, or the employee
or agent responsible to deliver it to the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.