Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3019

Re: Need to combine 2 columns (varchar + text) into 1

$
0
0

Actually, implicit conversions between TEXT (mapped to Long Varachar in IQ) and char/varchar are limited.

 

See restrictions provided here

LONG VARCHAR Data Type Conversion

 

Your sql code works when explicit conversion from Text to Varchar is used instead.

 

select id,  (case when name='clob' then  name  else cast(notes as varchar(10)) end) as  combinedcol from testText ;

 

Also this works :

 

select id, name || cast(notes as varchar(10)) from testText ;

 

Regards,


Viewing all articles
Browse latest Browse all 3019

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>