cancel
Showing results for 
Search instead for 
Did you mean: 

Incnsistent datatypes:

former_member203645
Active Participant
0 Kudos

Hi Gurus,

I am facing an issue with creating an Objects. Below is my code

 case when IOWA.SHIPMENT.SHIPMENTTYPE = 'BOOKOUT' then 24+trunc(IOWA.FINDETAIL.BEGTIME, 'MM') -- 25th of Delivery Month
                 when IOWA.TRADE.TRADETYPE like '%SWAP' then 4+Add_months(trunc(IOWA.FINDETAIL.BEGTIME, 'MM'),1) -- 5th of Month after Delivery Month
                 when IOWA.TRADE.TRADETYPE = 'PHYSICAL COAL' then 
                      case when IOWA.COUNTERPARTY.MASTERAGREEMENT = 'N' and IOWA.TRADE.INVFREQ = 'BI-MONTHLY'
                           then IOWA.FINDETAIL.BEGTIME+14            --14 days + Payment Terms
                           else -1+Add_months(trunc(IOWA.FINDETAIL.BEGTIME, 'MM'),1) -- End of Delivery Month + Payment Terms
                           end 
                           + case when IOWA.FINDETAIL.PAYMENTTERMS is not null then 'timecount' else 0 end
                 else -1+Add_months(trunc(IOWA.FINDETAIL.BEGTIME, 'MM'),1) -- End of Delivery Month
            end 

ERROR

Parse failed: Exeption: DBD,ORA-00932:inconistent datatypes: expected CHAR got NUMBER

Edited by: S.N... on Nov 28, 2011 5:02 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

the case statement should get a result datatype as Char, this is was the error message sense..

But, there are some calculations in the code, use to_char to convert them into char. Hope this helps you,

thanks,

Cs

Answers (0)