Symptom
- 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.
begin
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" ;
select getdate();
End;
Read more...
Environment
SAP IQ 16
Product
SAP IQ 16.0
Keywords
KBA , BC-SYB-IQ , Sybase IQ , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.