I understand that collation can be set differently in different tables in a database. Collation is understood from What does character set and collation mean exactly?
There is a query that performs CAST
from a char results as shown below. There are no tables involved. I guess, the encoding applied will be based on the collation in database level. Is this assumption correct?
SELECT CAST ( SSS.id_encrypt ('E','0000000{0}') AS CHAR(100) FOR BIT DATA)
AS ENCRYPT_ID FROM FFGLOBAL.ONE_ROW FETCH FIRST 1 ROW ONLY
QUESTION
In the question Get Byte[] from Db2 without Encoding answer given by @AlexFilipovici [.Net BlockCopy
] provides a different result when compared to CAST
result. Why is it so if there is no codepage
associated?
Based on National language support - Character conversion
Bit data (columns defined as FOR BIT DATA, or BLOBs, or binary strings) is not associated with any character set.
REFERENCE