- In SAP IQ 16 In the following command if the source column is timestamp datatype it returns NULL value
However if the varchar() size is set to 23 or higher then the SUBSTR will return correct output, if it is set to less than the size of actual data length, it returns NULL value.
declare @count_var bigint;
set @count_var = (select count(*) from "tblA");
select case when @count_var <= 2 then SUBSTR(cast( "tblA"."col2" as varchar(18)),12,5) else SUBSTR(cast( "tblA"."col2
" as varchar(18)),25,5) end as "colval" from "tblA" ;
SAP IQ 16
KBA , BC-SYB-IQ , Sybase IQ , Problem
About this pageThis is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).
Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.