Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavvibudagam
Creator II
Creator II

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.

jyothish8807

sasiparupudi1

petter-s

1 Solution

Accepted Solutions
jyothish8807
Master II
Master II

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'

Best Regards,
KC

View solution in original post

5 Replies
sunny_talwar

I think it is using ||

Where h.field1 || h.field2 ||  h.field3 || h.field4 ||  h.field5 = '12345'  ;

jyothish8807
Master II
Master II

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'

Best Regards,
KC
sunny_talwar

But why make it more difficult?

Concatenation Operator

jyothish8807
Master II
Master II

Ya we can use the || operator also

On Tue 15 May, 2018, 10:33 PM Sunny Talwar, <qcwebmaster@qlikview.com>

Best Regards,
KC
sasiparupudi1
Master III
Master III

Try

where (h.field1||''||h.field2||''||h.field3||''||h.field4||''||h.field5)='12345'