Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Concat two columns with space between

kzaneJun 14 2016 — edited Jun 15 2016

Hi,

I'm trying to concatenate two columns with space in between. No matter what I do I get this error:

[nQSError: 22020] Function Concat does not support non-text types.


However, if I concatenate these two columns without space it works!

I've tried a lot of options.

So, for a concrete example:

concat(CountryName, CountryId) - works, gives result: England1000

CountryName||CountryId - works, gives result: England1000

concat(concat(CountryName,' '), CountryId) - nQSError: 22020

concat(concat(cast(CountryName as varchar),' '), cast(CountryId as varchar)) - nQSError: 22020

CountryName||' '||CountryId - nQSError: 22020

cast(CountryName as varchar)||' '||cast(CountryId as varchar) - nQSError: 22020

Even if I try to join just one column (CountryName) with a custom text it does not work, for example:

CountryName||' ' - nQSError: 22020

CountryName||'-' - nQSError: 22020

concat(CountryName,' ') - nQSError: 22020

concat(CountryName,'-') - nQSError: 22020

concat(CountryName,'TEST') - nQSError: 22020

I even tried with IFNULL if nulls were causing a problem but that still didn't help.

concat(IFNULL(CountryName,''),'-') - nQSError: 22020

I tried casting as char too.

How do I solve this? It seems I've run out of options to try...

Thanks in advance

This post has been answered by kzane on Jun 15 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details