Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
xarapre7
Creator II
Creator II

Convert a field to CHAR but result is truncated

Hi Experts!


I'm trying to convert a VARCHAR field to CHAR as it's giving IE2 result.  I used this in the extract

SELECT

=IIf(len([FIELD]) > 1, '_'+Cast([FIELD] as CHAR),[FIELD]) AS [FIELD] 

but this is truncating the result from

{IT CONTROLROOM - LABELED MED INTERFACE} to {IT CONTROLROOM - LABELED MED}.


How should i correct this? Thanks in advance.

1 Reply
marcus_sommer

Within Qlik it's meaningless if a field within a sql-database is a varchar or a char. Therefore you might not need this converting. Most often it's preferable to use a Preceding Load to perform any transformations on the sql-output.

- Marcus