Hi,
I have experience in developing
commercial software with the C
language and embedded SQL statements,
but I am new to
PostgreSQL. I need to perform several
calculations, in a C program, with
data returned from lots of fields of
the NUMERIC (17, 7)
data type.
For example:
EXEC SQL BEGIN DECLARE SECTION;
numeric(17, 7) var_1;
numeric(17, 7) var_2;
long key = 123;
EXEC SQL END DECLARE SECTION;
EXEC SQL SELECT FIELD_1 INTO :var_1, FIELD_2 INTO :var_2 FROM MYTABLE WHERE THEKEY = :key;
var_1 += var_2 * 1.05;
...
/* After many calculations with */
/* var_1 and var_2, subjected */
/* to complex decision conditions. */
EXEC SQL UPDATE MYTABLE SET FIELD_1 = :var_1, FIELD_2 = :var_2 WHERE THEKEY = :key;
Please, does the ECPG interface work
with variables of the NUMERIC data
type, as shown above?
If not, what are the alternatives?
I looked up in all the documentation
and the mailing lists but didn't find
an answer.
Thank you very much.
Regards,
Antonio Sergio
__________________________________________________________________________
Acesso pelo menor pre�o do mercado! R$ 14,90 nos 3 primeiros meses!
ASSINE AGORA! http://www.bol.com.br/acessobol/