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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Advanced Settings SQL Expression Syntax

Hi everyone,
Just a quick question: while typing in an SQL expression in the Advanced Settings/Additional Columns section of an SQL Output component, if I want to use the column I am referencing in the expression itself, how will I do it?
For example:
"CASE WHEN COL_1 LIKE '%ABC%' THEN SUBSTRING(COL_1, 12, 13) ELSE ' ' "
If I just type COL_1, Talend doesn't recognize the column. If I use 'COL_1', then Talend thinks it is just a bit of text.
Any ideas?
Thanks!
Cihan
Labels (2)
1 Solution

Accepted Solutions
_AnonymousUser
Specialist III
Specialist III

hi! try to use double quotes and concatenate the strings like this:
"CASE WHEN "+COL_1+" LIKE '%ABC%' THEN SUBSTRING("+COL_1+", 12, 13) ELSE ' ' "

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Putting COL_1 in brackets also didn't work; Talend again couldn't recognize the column name.
Would be really glad if anyone had a solution/suggestion.
Thanks!
Anonymous
Not applicable
Author




I tried using brackets around the column name, like . That also didn't work.
_AnonymousUser
Specialist III
Specialist III

hi! try to use double quotes and concatenate the strings like this:
"CASE WHEN "+COL_1+" LIKE '%ABC%' THEN SUBSTRING("+COL_1+", 12, 13) ELSE ' ' "
Anonymous
Not applicable
Author

OK, that should work. Thanks!