sreeramnavale
Programmer
I use Crystal Reports 9.0 and oracle.
I have code Parameters 1.WH, 2.Start_Date, 3.End_Date in database Expert.
And the query as below.
WITH
Parms as (
Select
Case When '{?1.WH}' = '%' or '{?1.WH}'='8671' then 'true' else 'false' end as WH8671,
Case When '{?1.WH}' = '%' or '{?1.WH}'='8691' then 'true' else 'false' end as WH8691,
Case When '{?2.Start_Date}' = '' and '{?3.End_Date}' = '' then sysdate else to_date('1/1/2000','MM/DD/YYYY') end as System_D
From Dual
)
select
facility_id,
distro_nbr,
dest_id,
in_store_date,
requested_unit_qty,
retail_price, item_id,
'{?2.Start_Date}',
'{?3.End_Date}'
from
sa8671wh,
Parms
where
in_store_date >= System_D
and Parms.WH8671 = 'true'
union
select
facility_id,
distro_nbr,
dest_id,
in_store_date,
requested_unit_qty,
retail_price, item_id,
'{?2.Start_Date}',
'{?3.End_Date}'
from
sa8691wh,
Parms
where
in_store_date >= System_D
and Parms.WH8691 = 'true'
When I run this I get error message.
Query Engine Error: 'ORA-00920: invalid relational operator ORA-02063: preceding line from RDMLINK.
Any clue why this error is comming.
Regards,
SN
I have code Parameters 1.WH, 2.Start_Date, 3.End_Date in database Expert.
And the query as below.
WITH
Parms as (
Select
Case When '{?1.WH}' = '%' or '{?1.WH}'='8671' then 'true' else 'false' end as WH8671,
Case When '{?1.WH}' = '%' or '{?1.WH}'='8691' then 'true' else 'false' end as WH8691,
Case When '{?2.Start_Date}' = '' and '{?3.End_Date}' = '' then sysdate else to_date('1/1/2000','MM/DD/YYYY') end as System_D
From Dual
)
select
facility_id,
distro_nbr,
dest_id,
in_store_date,
requested_unit_qty,
retail_price, item_id,
'{?2.Start_Date}',
'{?3.End_Date}'
from
sa8671wh,
Parms
where
in_store_date >= System_D
and Parms.WH8671 = 'true'
union
select
facility_id,
distro_nbr,
dest_id,
in_store_date,
requested_unit_qty,
retail_price, item_id,
'{?2.Start_Date}',
'{?3.End_Date}'
from
sa8691wh,
Parms
where
in_store_date >= System_D
and Parms.WH8691 = 'true'
When I run this I get error message.
Query Engine Error: 'ORA-00920: invalid relational operator ORA-02063: preceding line from RDMLINK.
Any clue why this error is comming.
Regards,
SN