Hi,
Thanks for a reply, but i also tried the options what you have suggested. following is the sample script:-
.LOGTABLE XXXX.XX_test_exp_LOG;
.LOGON XXXX/XXXXX,XXXXX;
.BEGIN EXPORT SESSIONS 16 TENACITY 4 SLEEP 6;
.EXPORT OUTFILE /abc/def/test_exp.dat MODE RECORD FORMAT TEXT;
LOCKING XXXX.test_exp FOR ACCESS
SELECT
TRIM(COALESCE(CAST(col1 AS VARCHAR(12)),'')) || '|' ||
TRIM(COALESCE(CAST(col2 AS VARCHAR(10)),'')) || '|' ||
TRIM(COALESCE(CAST(col3 AS VARCHAR(5)),''))
FROM XXXX.test_exp;
.END EXPORT;
LOGOFF;
But still this does not help, i guess the problem lies with the casting, because if i cast the complete select statement with fixed char(XXX) then it works fine.
SELECT CAST(('' ||
TRIM(COALESCE(CAST(col1 AS CHAR(12)),'')) || '|' ||
TRIM(COALESCE(CAST(col2 AS VARCHAR(10)),'')) || '|' ||
TRIM(COALESCE(CAST(col3 AS VARCHAR(5)),''))) AS CHAR(30))
FROM XXXX.test_exp;
5|e|e
3|c|c
4|d|d
1|a|a
2|b|b
But the issue lies with what i need to cast to ? I need to know the complete row length for casting. Is there a way?
Thx for the suggestions and waiting for reply,
Rgds,
mtlrsk