Skip to main content

Hi,

The following code works in the database when run.

select 
       COH.DATE_ENTERED,
       COH.ORDER_NO,
       COH.ORDER_ID,
       COH.CONTRACT,
       COH.CUSTOMER_NO,
       COH.CUST_REF,
       COH.C_DEPOT,
       COH.STATE,
       COA.addr_1,
       COA.addr_2,
       COA.addr_3,
       COA.addr_4,
       COA.addr_5,
       COA.addr_6,
       COA.address1,
       COA.address2,
       COA.address3,
       COA.address4,
       COA.address5,
       COA.address6,
       COA.zip_code,
       COA.city,
       COA.state,
       COA.county from ifsapp.CUSTOMER_ORDER COH 
left join ifsapp.CUST_ORD_ADDRESS_2_UIV COA
on COA.order_no = COH.ORDER_NO
where to_date(COH.DATE_ENTERED,'dd/mm/yy') between to_date('&DATE_FROM', 'dd/mm/yy') and to_date('&DATE_TO', 'dd/mm/yy') and COH.ORDER_NO like 'H%'
and COH.CONTRACT like '%' || upper('&SITE') || '%'

 

However, when running the code in a quick report. I receive the following error: 

 

 

Maybe a stupid change, but could you try to change the format of the dates to this:

 

where TRUNC(COH.DATE_ENTERED,'DD-MM-YYYY') 
between TRUNC(TO_DATE('&DATE_FROM', 'DD-MM-YYYY')) and TRUNC(TO_DATE('&DATE_TO', 'DD-MM-YYYY'))


Hi, try changing the order of the conditions, I encountered a similar error in IFS but in the cloud version - there must not be any note or text as the last one and in your case you have a dynamic parameter with '' as the last one - maybe that is causing the problem. The script worked for me in PL/SQL Developer.


Reply