Hi,
I am trying to achieve something that seem trivial enough but so far all my attempts failed. I have a BTEQ session called from a Shell script, what I try to do is to create a string with a "some blanks" the size of this blank section is determined by a shell variable)
So what i have is :
SELECT
<...> || SUBSTRING(CAST('' as CHAR(${MAX_SPC_NB}) ) , 1, ${SPC_NB} ) | || <...>
FROM
Where MAX_SPC_NB > SPC_NB and both are determined on the fly (Can't harcode any of them)
The error i get :
' || SUBSTRING(CAST('' AS CHAR(8192)) , 1, 256 ) || '
$
*** Failure 3706 Syntax error: expected something between ')' and ','.
The same query called from SQLAssistant is working fine btw.