R
Rover
Maybe I misstated the real problem. Here is a further definition of the
problem:
When I run Query A (see below) it:
1) It gets equal compare on codes "E1CA" and "E1cA" whereas Query B
doesn't. I have verified that tbl_detail_Bene only contains "E1CA".
Query A is linking 2 tables while Query B has literals in the criteria
filelds. Why is Query B case sensitive and Query A not?
2) runs forever (hours) and table tbl_detail_Bene only has 2000 records.
Its like the query thinks its running against a non keyed table and it
is not.
I need to resolve both issues but item 1 is more important
==========================
Query A gets the benefit code description (ppbenf.ppdesc_benf) from
ppbenf table. The source table (tbl_detail_Bene) fields INNER JOIN to
all ppbenf table's key fields.
Table tbl_detail_Bene is not keyed. Table ppbenf is.
===============================
Query A:
SELECT tbl_detail_Bene.ppbenB, tbl_detail_Bene.chplan,
tbl_detail_Bene.chplrv, tbl_detail_Bene.[CLL-BENEFIT-CD],
ppbenf.ppcode_benf, tbl_detail_Bene.cdbnsf, ppbenf.ppdesc_benf INTO
tbl_Detail_bene_desc
FROM tbl_detail_Bene INNER JOIN ppbenf ON (tbl_detail_Bene.cdbnsf =
ppbenf.ppsufx_benf) AND (tbl_detail_Bene.[CLL-BENEFIT-CD] =
ppbenf.ppcode_benf) AND (tbl_detail_Bene.chplrv = ppbenf.pprevl_benf)
AND (tbl_detail_Bene.chplan = ppbenf.ppplno_benf) AND
(tbl_detail_Bene.ppbenB = ppbenf.ppcnst_benf);
==================================
Query B:
SELECT ppbenf.ppcnst_benf, ppbenf.ppplno_benf, ppbenf.pprevl_benf,
ppbenf.ppcode_benf, ppbenf.ppsufx_benf, ppbenf.ppdesc_benf
FROM ppbenf
WHERE (((ppbenf.ppcnst_benf)="b") AND ((ppbenf.ppplno_benf)="97181A")
AND ((ppbenf.pprevl_benf)="02") AND ((ppbenf.ppcode_benf)="E1CA") AND
((ppbenf.ppsufx_benf)="C"));
problem:
When I run Query A (see below) it:
1) It gets equal compare on codes "E1CA" and "E1cA" whereas Query B
doesn't. I have verified that tbl_detail_Bene only contains "E1CA".
Query A is linking 2 tables while Query B has literals in the criteria
filelds. Why is Query B case sensitive and Query A not?
2) runs forever (hours) and table tbl_detail_Bene only has 2000 records.
Its like the query thinks its running against a non keyed table and it
is not.
I need to resolve both issues but item 1 is more important
==========================
Query A gets the benefit code description (ppbenf.ppdesc_benf) from
ppbenf table. The source table (tbl_detail_Bene) fields INNER JOIN to
all ppbenf table's key fields.
Table tbl_detail_Bene is not keyed. Table ppbenf is.
===============================
Query A:
SELECT tbl_detail_Bene.ppbenB, tbl_detail_Bene.chplan,
tbl_detail_Bene.chplrv, tbl_detail_Bene.[CLL-BENEFIT-CD],
ppbenf.ppcode_benf, tbl_detail_Bene.cdbnsf, ppbenf.ppdesc_benf INTO
tbl_Detail_bene_desc
FROM tbl_detail_Bene INNER JOIN ppbenf ON (tbl_detail_Bene.cdbnsf =
ppbenf.ppsufx_benf) AND (tbl_detail_Bene.[CLL-BENEFIT-CD] =
ppbenf.ppcode_benf) AND (tbl_detail_Bene.chplrv = ppbenf.pprevl_benf)
AND (tbl_detail_Bene.chplan = ppbenf.ppplno_benf) AND
(tbl_detail_Bene.ppbenB = ppbenf.ppcnst_benf);
==================================
Query B:
SELECT ppbenf.ppcnst_benf, ppbenf.ppplno_benf, ppbenf.pprevl_benf,
ppbenf.ppcode_benf, ppbenf.ppsufx_benf, ppbenf.ppdesc_benf
FROM ppbenf
WHERE (((ppbenf.ppcnst_benf)="b") AND ((ppbenf.ppplno_benf)="97181A")
AND ((ppbenf.pprevl_benf)="02") AND ((ppbenf.ppcode_benf)="E1CA") AND
((ppbenf.ppsufx_benf)="C"));