I'm needing a little help with this.
I'm pulling data from 3 tables where the closing date is/was yesterday. But it just loops on the first record. So I added the order by clause but that just didn't run at all.
SELECT A.ACCT_NBR, A.TRN_DT, A.TRN_TYP, A.TRN_AMT, A.TRN_CURR_CD, A.DECI_CD, A.TRN_PIN_VRFY_CD, A.TRN_CVV_VRFY_CD, A.TRN_POS_ENT_CD, A.CRD_PSNT_IND, A.FRD_SCOR, A.CRD_CLNT_ID, A.ICA_NBR, A.SIC_CD, A.MER_ID, A.MER_NM, A.MER_CTY, A.MER_ZIP, A.MER_ST, A.MER_CNTY_CD, A.LST_UPD_DT, B.CAS_CRE_DT, B.CAS_OPN_DT, B.CAS_CLS_DT, B.USR_ID, B.CAS_STA, B.CAS_ACTV, B.CAS_BLK, C.CMNT, C.CNTK_CD, C.BLK_CD, C.CLS_CD, C.FRD_CD
FROM TABLE_1 A, TABLE_2 B, TABLE_3 C
WHERE B.CAS_CLS_DT =(sysdate -1) AND B.CAS_STA= '2'
ORDER BY COUNT(*), A.ACCT_NBR;
I'm pulling data from 3 tables where the closing date is/was yesterday. But it just loops on the first record. So I added the order by clause but that just didn't run at all.
SELECT A.ACCT_NBR, A.TRN_DT, A.TRN_TYP, A.TRN_AMT, A.TRN_CURR_CD, A.DECI_CD, A.TRN_PIN_VRFY_CD, A.TRN_CVV_VRFY_CD, A.TRN_POS_ENT_CD, A.CRD_PSNT_IND, A.FRD_SCOR, A.CRD_CLNT_ID, A.ICA_NBR, A.SIC_CD, A.MER_ID, A.MER_NM, A.MER_CTY, A.MER_ZIP, A.MER_ST, A.MER_CNTY_CD, A.LST_UPD_DT, B.CAS_CRE_DT, B.CAS_OPN_DT, B.CAS_CLS_DT, B.USR_ID, B.CAS_STA, B.CAS_ACTV, B.CAS_BLK, C.CMNT, C.CNTK_CD, C.BLK_CD, C.CLS_CD, C.FRD_CD
FROM TABLE_1 A, TABLE_2 B, TABLE_3 C
WHERE B.CAS_CLS_DT =(sysdate -1) AND B.CAS_STA= '2'
ORDER BY COUNT(*), A.ACCT_NBR;