Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
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 with 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.
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.