
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Concatenation syntax help
Hi Experts,
Can any one please help me on below requirement.
I have 5 fields in oracle table in qlik like below. I have to concatenate these 5 fields and need to apply where condition on one record.
In qlik will do concatenation like with where condition where field1 &' '& field2 &' '& field3 &' ' & field4 &' '& field5 = '12345' ;
I need the same concatenation syntax in oracle to pass at Select statement. Please help me how to do field concatenation in Oracle what changes i need to made at red color highlighted line.
Table:
Load
field1,
field2,
field3,
field4,
field5 where field1 &' '& field2 &' '& field3 &' ' & field4 &' '& field5 = '12345' ;
Select
h.field1,
h.field2,
h.field3,
h.field4,
h.field5
from db.TEST
where h.field1 &' '& h.field2 &' '& h.field3 &' ' & h.field4 &' '& h.field5 in '12345' ;
Thanks in advance.
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try like this.
In oracle concat works for max two fields , so u need to use nested concat.
Where Concat(Concat(Concat(field1,field1),field3),field4) = '12345'
KC

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think it is using ||
Where h.field1 || h.field2 || h.field3 || h.field4 || h.field5 = '12345' ;


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try like this.
In oracle concat works for max two fields , so u need to use nested concat.
Where Concat(Concat(Concat(field1,field1),field3),field4) = '12345'
KC

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But why make it more difficult?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ya we can use the || operator also
On Tue 15 May, 2018, 10:33 PM Sunny Talwar, <qcwebmaster@qlikview.com>
KC


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try
where (h.field1||''||h.field2||''||h.field3||''||h.field4||''||h.field5)='12345'
