Good afternoon,
I have two reports that are exactly the same (the same parameters, same fields, same record selection, etc) except for one detail: Report 1 uses three tables, DPSP, FHP, and FDP (connected in that sequence) and Report 2 only uses 2 tables, DPSP and FDP.
The reports give me different results sometimes. Even though I'm not actually using any fields from the FHP table, merely connecting the other 2 tables through the FHP table changes the results. I need to get the results that both the reports are giving me into a single report.
My question is, what can I do to find out what is causing each report to give me different data? If I can understand why I'm getting different results, I'll know how to get all the results in a single report.
Thanks in advance for your help.
I've pasted the SQL queries in case that is useful:
Report 1:
SELECT "FDP"."RVCTFD", "FDP"."AMNTFD", "FDP"."RCDTFD", "DPSP"."TORGDP", "DPSP"."CONVDP", "DPSP"."PKGBCDP", "DPSP"."RTEPDP", "DPSP"."PKGDP", "DPSP"."EFDTDP", "DPSP"."SEQDP", "DPSP"."LNAMDP", "DPSP"."FNAMDP", "DPSP"."RMNODP", "DPSP"."TTYPDP", "FDP"."RKY1FD", "FDP"."TAX1FD", "FDP"."TAX2FD", "FDP"."DATEFD", "FDP"."TIP$FD", "DPSP"."PROGDP"
FROM ("TEXASA"."LMDTA"."FDP" "FDP" INNER JOIN "TEXASA"."LMDTA"."FHP" "FHP" ON ("FDP"."FKYDFD"="FHP"."FKYDFH") AND ("FDP"."FSEQFD"="FHP"."FSEQFH")) INNER JOIN "TEXASA"."LMDTA"."DPSP" "DPSP" ON ("FHP"."KYDTFH"="DPSP"."KYDTDP") AND ("FHP"."SEQFH"="DPSP"."SEQDP")
WHERE "FDP"."RCDTFD"="DPSP"."EFDTDP" AND "FDP"."RVCTFD"<>' ' AND "FDP"."RKY1FD"=0 AND "DPSP"."PROGDP"='PSTRTXG'
Report 2:
SELECT DISTINCT "FDP"."RVCTFD", "FDP"."AMNTFD", "FDP"."RCDTFD", "DPSP"."TORGDP", "DPSP"."CONVDP", "DPSP"."PKGBCDP", "DPSP"."RTEPDP", "DPSP"."PKGDP", "DPSP"."EFDTDP", "DPSP"."LNAMDP", "DPSP"."FNAMDP", "DPSP"."RMNODP", "DPSP"."TTYPDP", "FDP"."RKY1FD", "FDP"."TAX1FD", "FDP"."TAX2FD", "DPSP"."PROGDP", "FDP"."DATEFD", "DPSP"."SEQDP", "FDP"."TIP$FD"
FROM "TEXASA"."LMDTA"."FDP" "FDP" INNER JOIN "TEXASA"."LMDTA"."DPSP" "DPSP" ON ("FDP"."FKYDFD"="DPSP"."FKYDDP") AND ("FDP"."FSEQFD"="DPSP"."FSEQDP")
WHERE "FDP"."RKY1FD"=0 AND "FDP"."RCDTFD"="DPSP"."EFDTDP" AND "FDP"."RVCTFD"<>' ' AND "DPSP"."PROGDP"='PSTRTXG'
I have two reports that are exactly the same (the same parameters, same fields, same record selection, etc) except for one detail: Report 1 uses three tables, DPSP, FHP, and FDP (connected in that sequence) and Report 2 only uses 2 tables, DPSP and FDP.
The reports give me different results sometimes. Even though I'm not actually using any fields from the FHP table, merely connecting the other 2 tables through the FHP table changes the results. I need to get the results that both the reports are giving me into a single report.
My question is, what can I do to find out what is causing each report to give me different data? If I can understand why I'm getting different results, I'll know how to get all the results in a single report.
Thanks in advance for your help.
I've pasted the SQL queries in case that is useful:
Report 1:
SELECT "FDP"."RVCTFD", "FDP"."AMNTFD", "FDP"."RCDTFD", "DPSP"."TORGDP", "DPSP"."CONVDP", "DPSP"."PKGBCDP", "DPSP"."RTEPDP", "DPSP"."PKGDP", "DPSP"."EFDTDP", "DPSP"."SEQDP", "DPSP"."LNAMDP", "DPSP"."FNAMDP", "DPSP"."RMNODP", "DPSP"."TTYPDP", "FDP"."RKY1FD", "FDP"."TAX1FD", "FDP"."TAX2FD", "FDP"."DATEFD", "FDP"."TIP$FD", "DPSP"."PROGDP"
FROM ("TEXASA"."LMDTA"."FDP" "FDP" INNER JOIN "TEXASA"."LMDTA"."FHP" "FHP" ON ("FDP"."FKYDFD"="FHP"."FKYDFH") AND ("FDP"."FSEQFD"="FHP"."FSEQFH")) INNER JOIN "TEXASA"."LMDTA"."DPSP" "DPSP" ON ("FHP"."KYDTFH"="DPSP"."KYDTDP") AND ("FHP"."SEQFH"="DPSP"."SEQDP")
WHERE "FDP"."RCDTFD"="DPSP"."EFDTDP" AND "FDP"."RVCTFD"<>' ' AND "FDP"."RKY1FD"=0 AND "DPSP"."PROGDP"='PSTRTXG'
Report 2:
SELECT DISTINCT "FDP"."RVCTFD", "FDP"."AMNTFD", "FDP"."RCDTFD", "DPSP"."TORGDP", "DPSP"."CONVDP", "DPSP"."PKGBCDP", "DPSP"."RTEPDP", "DPSP"."PKGDP", "DPSP"."EFDTDP", "DPSP"."LNAMDP", "DPSP"."FNAMDP", "DPSP"."RMNODP", "DPSP"."TTYPDP", "FDP"."RKY1FD", "FDP"."TAX1FD", "FDP"."TAX2FD", "DPSP"."PROGDP", "FDP"."DATEFD", "DPSP"."SEQDP", "FDP"."TIP$FD"
FROM "TEXASA"."LMDTA"."FDP" "FDP" INNER JOIN "TEXASA"."LMDTA"."DPSP" "DPSP" ON ("FDP"."FKYDFD"="DPSP"."FKYDDP") AND ("FDP"."FSEQFD"="DPSP"."FSEQDP")
WHERE "FDP"."RKY1FD"=0 AND "FDP"."RCDTFD"="DPSP"."EFDTDP" AND "FDP"."RVCTFD"<>' ' AND "DPSP"."PROGDP"='PSTRTXG'