Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all.
I just got a database as a "heritage" from my former peer and I faced a problem while merging two columns into a new one as a Case. I tried to find several hints and guides, but the vertical bars command " || " worked well and I could find nothing even in Qlik guides explaining how it works.
The example below is that I'm using:
SELECT
CTB.BATCH,
CTB.SEQUENCE,
CTB.BATCH || '/' || CTB.SEQUENCE as BATCH _SEQUENCE,
FROM...
Does anyone knows why this works in Qlik? My former peer already left the company without this explanation for me and I can't reach him.
This isn't Qlik script. This is an SQL query that is passed on to the database as, so the concatenation is being handled on that side of things.
I agree with you, but the SQL concat I usually see uses a command +, not the ||. This still is a mistery for me.
Hi @rbr199,
SQL Concatenate Operator uses || not + if I am not wrong.
Please check SQL Documentations for more details on this.
For reference:
SQL | Concatenation Operator - GeeksforGeeks
Thank you.
different database support different concatenation operators some support '+' some support '||'