Subject | for execute statement stopped to work |
---|---|
Author | diego yahoo |
Post date | 2010-03-04T17:22:12Z |
Hi my friends. I have a stored procedure that works since 2008 and now it
stopped to work (it doesn't get in on a for command).
My version of firebird is 2.0.5.13206
This is the command that Im using:
DECLARE VARIABLE iAnoAnterior INTEGER;
for execute statement
' SELECT PRODUTO,COALESCE(SALDO,0),COALESCE(PR_MEDIO,0) FROM CONTROLE
WHERE ANO = CAST( ' || :IANOANTERIOR || ' AS INTEGER ) ORDER BY 1 ' INTO
:IPRODUTOANOANTERIOR,:DSALDOANOANTERIOR,:DPRECOANOANTERIOR DO
BEGIN
END;
If I put the parameter direct, it works (without the command of
concatenation), like that: CAST( 2008 AS INTEGER )
I saw that I can't put the parameter with concatenation.
I hope you can help me..
I really need to do that.
Diego Abib.
[Non-text portions of this message have been removed]
stopped to work (it doesn't get in on a for command).
My version of firebird is 2.0.5.13206
This is the command that Im using:
DECLARE VARIABLE iAnoAnterior INTEGER;
for execute statement
' SELECT PRODUTO,COALESCE(SALDO,0),COALESCE(PR_MEDIO,0) FROM CONTROLE
WHERE ANO = CAST( ' || :IANOANTERIOR || ' AS INTEGER ) ORDER BY 1 ' INTO
:IPRODUTOANOANTERIOR,:DSALDOANOANTERIOR,:DPRECOANOANTERIOR DO
BEGIN
END;
If I put the parameter direct, it works (without the command of
concatenation), like that: CAST( 2008 AS INTEGER )
I saw that I can't put the parameter with concatenation.
I hope you can help me..
I really need to do that.
Diego Abib.
[Non-text portions of this message have been removed]