Stangleboy
Programmer
I am trying to get the same data retrieved for different months, but not sure how to code it. It works fine for 1 month (May in this case) but I need to know if the person made a payment in full for each month for April and June also in one query. Thank you for your time and patience:
SELECT Distinct
CC.C_CASE_EXTID As 'CaseNumber'
CA.CA_CRNT_SUPT As 'CurrentSupport'
--CAST.CAST_CHLD_SUPT_AMT As 'ChildSupport',
--CAST.CAST_EFF_TRANS_TS As 'PaymentDate'
FROM
CASE_CAS As CC INNER JOIN
CASE_ACCOUNT As CA ON CC.CAS_CASE_ACCT_SUM_ID = CA.CA_CASE_ACCT_SUM_ID INNER JOIN
CASE_ACCOUNT_SUMMARY_TRANSACTION As CAST ON CC.CAS_CASE_ACCT_SUM_ID = CAST.CAST_CASE_ACCT_SUM_ID
WHERE
CC.C_MNG_CNTY_FIPS_CD = '071'
And CC.C_PND_CLS_STAT_CD <> 'ACT'
And CC.C_CRNT_STAT_CD = 'OPN'
And CA.CA_CRNT_SUPT = '0'
And CAST.CAST_CHLD_SUPT_AMT <> '0'
And CAST.CAST_EFF_TRANS_TS Between '2010-05-01' And '2010-05-31'
SELECT Distinct
CC.C_CASE_EXTID As 'CaseNumber'
CA.CA_CRNT_SUPT As 'CurrentSupport'
--CAST.CAST_CHLD_SUPT_AMT As 'ChildSupport',
--CAST.CAST_EFF_TRANS_TS As 'PaymentDate'
FROM
CASE_CAS As CC INNER JOIN
CASE_ACCOUNT As CA ON CC.CAS_CASE_ACCT_SUM_ID = CA.CA_CASE_ACCT_SUM_ID INNER JOIN
CASE_ACCOUNT_SUMMARY_TRANSACTION As CAST ON CC.CAS_CASE_ACCT_SUM_ID = CAST.CAST_CASE_ACCT_SUM_ID
WHERE
CC.C_MNG_CNTY_FIPS_CD = '071'
And CC.C_PND_CLS_STAT_CD <> 'ACT'
And CC.C_CRNT_STAT_CD = 'OPN'
And CA.CA_CRNT_SUPT = '0'
And CAST.CAST_CHLD_SUPT_AMT <> '0'
And CAST.CAST_EFF_TRANS_TS Between '2010-05-01' And '2010-05-31'