Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORACLE ERROR: 'ORA-00920: invalid relational operator ORA-02063: prece

Status
Not open for further replies.

sreeramnavale

Programmer
Feb 18, 2004
40
US
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

 
You've coded parameters in the database expert? What does this mean?

What connectivity are you using?

I would guess that the WITH won't work, but again, you don't state how you are building this query.

I would suggest creating a View or an SP, and again, HOW you connect to Oracle is key here.

You should be using the Oracle native connectivity, or if you're using ODBC, use the Crystal supplied Oracle ODBC driver, not the Pracle supplied driver.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top