The relation between To-Do and other entities are usually created in CC&B with Drill Keys now the question arises what are the drill keys. Drill keys are used to navigate from To-Do to source entity. Following is the query to retrive source information from To-Do's with using drill keys .
For Bill
SELECT *
FROM CI_TD_ENTRY TE
INNER JOIN CI_TD_DRLKEY CTD
ON(TE.TD_ENTRY_ID = CTD.TD_ENTRY_ID)
INNER JOIN CI_BILL CB
ON (CTD.KEY_VALUE = CB.BILL_ID);
For Account
SELECT *
FROM CI_TD_ENTRY TE
INNER JOIN CI_TD_DRLKEY CTD
ON(TE.TD_ENTRY_ID = CTD.TD_ENTRY_ID)
INNER JOIN CI_ACCT CA
ON (CTD.KEY_VALUE = CA.ACCT_ID);
For Case
SELECT *
FROM CI_TD_ENTRY TE
INNER JOIN CI_TD_DRLKEY CTD
ON(TE.TD_ENTRY_ID = CTD.TD_ENTRY_ID)
INNER JOIN CI_CASE CC
ON (CTD.KEY_VALUE = CC.CASE_ID);
To find the drill key information go through the CI_TD_DRLKEY_TY table.
For Bill
SELECT *
FROM CI_TD_ENTRY TE
INNER JOIN CI_TD_DRLKEY CTD
ON(TE.TD_ENTRY_ID = CTD.TD_ENTRY_ID)
INNER JOIN CI_BILL CB
ON (CTD.KEY_VALUE = CB.BILL_ID);
For Account
SELECT *
FROM CI_TD_ENTRY TE
INNER JOIN CI_TD_DRLKEY CTD
ON(TE.TD_ENTRY_ID = CTD.TD_ENTRY_ID)
INNER JOIN CI_ACCT CA
ON (CTD.KEY_VALUE = CA.ACCT_ID);
For Case
SELECT *
FROM CI_TD_ENTRY TE
INNER JOIN CI_TD_DRLKEY CTD
ON(TE.TD_ENTRY_ID = CTD.TD_ENTRY_ID)
INNER JOIN CI_CASE CC
ON (CTD.KEY_VALUE = CC.CASE_ID);
To find the drill key information go through the CI_TD_DRLKEY_TY table.
No comments:
Post a Comment