Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

BTEQ syntax with CAST embedded in SUBSTRING function - response (2) by totototototo

$
0
0

Ok, I did not even notice that SUBSTR & SUBSTRING were behaving differently.
I am new to the Teradata DB and I inherited this piece of code, I clearly did not challenged enough the existing code. Anyway, the solution CHAR(${SPC_NB})   is also raising the error.
I tried the others and the one that works is 
SUBSTRING(CAST('' AS  CHAR(${MAX_SPC_NB})) FROM 1 FOR  SPC_NB ) 
Thanks for pointing me to the right direction, really appreciated. 
 
 
 
 
 


Viewing all articles
Browse latest Browse all 14773

Trending Articles