× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I do complete it with one request:
create table qtemp.dossprof as (
select $dossier, profession
from qtemp.custdoss d join qtemp.custmast m
on d.$customer = m.$customer
) with data


Your RPG is incomplete.
1 - No writes or updates
2 - Where do you get dossier in the first chain? An update/primary on
dossprof?
3 - What happens if either chain is unsuccessful? Shouldn't you purge the
old record from dossprof?

Want to do it with NO requests? Then run these two statements once and
forget about it.
DROP TABLE DOSSPROF

create VIEW qtemp.dossprof as (
select $dossier, profession
from qtemp.custdoss d join qtemp.custmast m
on d.$customer = m.$customer
)

Now, all changes are in sync. If you just have to have a key for Record
Level Access (ie RPG CHAIN) then use a join logical file instead. But if
it's for query only then the view will be just fine.

You can verify that view with
SELECT * FROM QTEMP.DOSSPROF
and you should see
$DOSSIER PROFESSION
2 6
7 6

So, if you add another dossier
INSERT INTO QTEMP.CUSTDOSS VALUES(4,23)

then this:
SELECT * FROM QTEMP.DOSSPROF
will return
$DOSSIER PROFESSION
2 6
7 6
23 6


Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.