Hello All,
I need suggestion for selecting the data from a table after decrypting from CLOB column type.
Data is being stored in a table which has LVARCHAR data type(earlier created) in encrypted format and then inserting in another table (newly created) which has CLOB data type in SBSPACE.
But while selecting data with decrypting it is giving error.
Below is the details:
Source table
==========
create table "informix".cs_cons_phto
( seqn integer not null ,
phto_file lvarchar(32739)
Target Table
==========
create table "informix".cs_csid_phto_00 (
seqn Integer not null,
phto_file clob null
) PUT phto_file IN (sbs001);
Inserting data in new table:
==========================
Inserting the data into target table , inserting the lvarchar into clob column which is in the target table
INSERT INTO cs_csid_phto_00 ( seqn, phto_file)
SELECT 3, ENCRYPT_AES( DECRYPT_CHAR(phto_file, 'MDID ON DB KEY.')::CLOB, 'mySecretPassword' )
FROM cs_cons_phto where seqn = 999999;
9632: Value does not match the type of column (phto_file).
and if try to select get below error: (another sequence)
select DECRYPT_CHAR( phto_file, 'MDID ON DB KEY.' )
from cs_csid_phto_00 where seqn = 4;
26005: The encrypted data is wrong or corrupted.
Kindly Suggest, what should be done.
Thanks
Amit
------------------------------
AMIT PATEL
------------------------------