Scenario is to make data in column 16 digit irrespective of data flowing from file into table.
Create table T1
( col1 varchar(16) not null,
File has data :
Output should be :
Idea is to have col2 (16 digit) irrespective of any data in file. We have to pad '0' from left side if there are not sufficient numbers.
I have tried the below query to perform it :
insert into ()
CASE WHEN :col2 IS NOT NULL THEN
CAST(CAST(:col2 AS FORMAT '9(16)') AS CHAR(16))
It is throwing error "UTY0805 RDBMS failure, 3527: Format string '9(16)' has combination of numeric, character and GRAPHIC values". But this operations works in SELECT qeuery directly. I belive it is not working in BTEQ. Please advise.
Hope this give fair understanding of problem. Appreciate your quick response. Thanks
Solved! Go to Solution.