CR Developer 9.2.2, Oracle 9i, ODBC drivers
I have 2 tables Item Master & transactions, linked (left outer join) by im_key > tx_imkey.
I want the report to show all items on the item master that begin with I114 and have catalog code 114. In addition, I want all trans for these items between date 9/1/04 and 9/30/04.
This is the SQL Query generated by CR
SELECT "IM"."IM_KEY", "IM"."IM_DESCR", "IM"."IM_UNIT_S", "IM"."IM_CATALOG", "IM"."IM_ON_HAND", "TX"."TX_DATE", "TX"."TX_QTY", "TX"."TX_ORIGIN"
FROM "PK1"."IM" "IM", "PK1"."TX" "TX"
WHERE ("IM"."IM_KEY"="TX"."TX_IMKEY" (+)) AND "IM"."IM_KEY" LIKE 'I114%' AND "IM"."IM_CATALOG"='114'
ORDER BY "IM"."IM_KEY"
and this is the record selection formula generated by Cr, except for the isnull line I added.
{IM.IM_KEY} startswith "I114" and
{IM.IM_CATALOG} = "114" and
(isnull({@trandate})or
{@trandate} = {?DateRange})
I am getting all items that have no trans at all, items and trans that have trans in 09/04, but I do not get the items with only trans prior to 9/01/04. What am I doing wrong?
I have 2 tables Item Master & transactions, linked (left outer join) by im_key > tx_imkey.
I want the report to show all items on the item master that begin with I114 and have catalog code 114. In addition, I want all trans for these items between date 9/1/04 and 9/30/04.
This is the SQL Query generated by CR
SELECT "IM"."IM_KEY", "IM"."IM_DESCR", "IM"."IM_UNIT_S", "IM"."IM_CATALOG", "IM"."IM_ON_HAND", "TX"."TX_DATE", "TX"."TX_QTY", "TX"."TX_ORIGIN"
FROM "PK1"."IM" "IM", "PK1"."TX" "TX"
WHERE ("IM"."IM_KEY"="TX"."TX_IMKEY" (+)) AND "IM"."IM_KEY" LIKE 'I114%' AND "IM"."IM_CATALOG"='114'
ORDER BY "IM"."IM_KEY"
and this is the record selection formula generated by Cr, except for the isnull line I added.
{IM.IM_KEY} startswith "I114" and
{IM.IM_CATALOG} = "114" and
(isnull({@trandate})or
{@trandate} = {?DateRange})
I am getting all items that have no trans at all, items and trans that have trans in 09/04, but I do not get the items with only trans prior to 9/01/04. What am I doing wrong?