×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
All,
Was trying to help this poster to Stack Exchange..
https://stackoverflow.com/questions/31819088/db2-sql-interpret-a-field-as-other-ccsid
I created a test file with a single field named test withh a CCSID of 13488.
The DB is perfectly happy with this:
SELECT hex(substr(test,7,3))
, cast(substr(test,7,3) as char (3) CCSID 37)
FROM wiltc/test
But this:
SELECT hex(substr(test,1,6))
, cast(substr(test,1,6) as nchar)
FROM wiltc/test
returns
SQL0332 - Character conversion between CCSID 65535 and CCSID 1200 not valid
This also returns an SQL0332
SELECT hex(substr(test,1,6))
, cast(substr(test,1,6) as char (6) CCSID 13488)
FROM wiltc/test
It seems to me that if the DB is going to allow any cast from 65535, it
should allow them all.
Charles
As an Amazon Associate we earn from qualifying purchases.