0

I am having a query as below

select SHIPMENT_COST_SEQNO as SHIPMENT_COST_SEQNO from shipment_cost where shipment_gid = 'A1.53005'

which gives me error as 'java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.String '

Though the SHIPMENT_COST_SEQNO is a 5 digit number but still gives me above error.

This works fine with SQL Interface but when i try execute from application it gives me above error .

Any pointers would be appreciable.

Thanks

2
  • Can you share more details about your application? Do you try to store the value into a string field? Commented Feb 11, 2022 at 11:09
  • The SHIPMENT_COST_SEQNO is of data type Number. The application is Oracle transportation management (OTM) Commented Feb 11, 2022 at 11:15

1 Answer 1

1

seems you need casting as your used in entity sting

select cast(SHIPMENT_COST_SEQNO as varchar(50))
 as SHIPMENT_COST_SEQNO from shipment_cost where shipment_gid = 'A1.53005'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.