Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

POAAPC & PORCPAL/POINVAL/etc

Status
Not open for further replies.

iwells

Programmer
Oct 2, 2012
284
CA
Hi,

Looking at the documentation for Accpac and I see the following for POAAPC:

Document Link DOCZSEQ, DAYENDSEQ, HEADSEQ, LINESEQ, CURRENCY

For PORCPAL I see:

Detail Key DAYENDSEQ, RCPAHSEQ, RCPALSEQ

I've done some playing around when joining POAAPC and I'm finding when joining tables here what I need to do:

POAAPC
INNER JOIN
PORCPAL
ON POAAPC.DAYENDSEQ = PORCPAL.DAYENDSEQ AND
POAAPC.HEADSEQ = PORCPAL.RCPAHSEQ AND
POAAPC.LINESEQ = PORCPAL.RCPALSEQ AND
POAAPC.TRANSTYPE = 3

OR

POAAPC
INNER JOIN
POINVAL
ON POAAPC.DAYENDSEQ = POINVAL.DAYENDSEQ AND
POAAPC.HEADSEQ = POINVAL.INVAHSEQ AND
POAAPC.DOCZSEQ = POINVAL.INVALSEQ AND
POAAPC.TRANSTYPE = 5

OR

POAAPC
INNER JOIN
PORETAL
ON POAAPC.DAYENDSEQ = PORETAL.DAYENDSEQ AND
POAAPC.HEADSEQ = PORETAL.RETAHSEQ AND
POAAPC.LINESEQ = PORETAL.RETALSEQ AND
POAAPC.TRANSTYPE = 4

OR

POAAPC
INNER JOIN
POCRNAL
ON POAAPC.DAYENDSEQ = POCRNAL.DAYENDSEQ AND
POAAPC.HEADSEQ = POCRNAL.CRNAHSEQ AND
POAAPC.DOCZSEQ = POCRNAL.CRNALSEQ AND
POAAPC.TRANSTYPE = 6

As you can see sometimes DOCZSEQ is used instead of LINESEQ in my joins and I'm totally ignoring CURRENCY. Are my joins correct or should all the fields be used in the join at once? I guess I don't understand why a "document link" to some tables uses one field and to another table uses a different field, and I'm trying to understand the significance of CURRENCY, if any? Just looking for someone to confirm my queries or correct me if I'm wrong.

Thanks,

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top