[firebase-br] Update Firebird 2.5 nao funciona

Carlos H. Cantu listas em warmboot.com.br
Qui Maio 3 17:41:21 -03 2012


Retirado do Firebird.conf que acompanha o FB 2.5:

# Prior to Firebird 2.5 the SET clause of the UPDATE statement assigned
# columns in the user-defined order with the NEW column values being
# immediately accessible to the subsequent assignments. This did not
# conform to the SQL standard. Starting with Firebird 2.5, only OLD column
# values are accessible to all the assignments of the SET clause.
#
# Example of the old vs new behaviour:
#
# UPDATE T SET A = B, B = A
# old result: A gets equal to B, B doesn't change
# new result: A and B get their values exchanged
#
# Change this configuration option to 1 (true) only if your SQL code relies
# on the legacy semantics of the SET clause. It's provided as a temporary
# solution for backward compatibility issues and will be deprecated in
# future Firebird versions.
#
# Type: boolean
#
#OldSetClauseSemantics = 0

[]s
Carlos H. Cantu
www.FireBase.com.br - www.firebirdnews.org
www.warmboot.com.br - blog.firebase.com.br

hngc> Estou com um problema em meu sistema para atualizar alguns
hngc> valores no banco de dados com o Firebird 2.5.1 e resolvi criar
hngc> um banco novo no Firebird 2.5.1 com uma tabela e confirmar o problema;

hngc> Quando rodo um update alterando um campo com a soma de outros 2
hngc> campos este primeiro permanece zerado.

hngc> /* inseri um novo registro */
hngc> INSERT INTO TABELA (ID_TABELA, VALOR1, VALOR2, VALOR3) VALUES (1, 0, 0, 0);

hngc> /* ao rodar o update o campo valor3 continuou zerado */
hngc> update tabela set
hngc> valor1 = 10,
hngc> valor2 = 20,
hngc> valor3 = valor1 + valor2
hngc> where id_tabela = 1

hngc> Fiz o mesmo no firebird 2.1 e funciona sem problemas. 

hngc> O que posso estar fazendo de errado?


hngc> Desde já agradeço,
hngc> Humberto Mendes
hngc> ______________________________________________
hngc> FireBase-BR (www.firebase.com.br) - Hospedado em www.locador.com.br
hngc> Para saber como gerenciar/excluir seu cadastro na lista, use:
hngc> http://www.firebase.com.br/fb/artigo.php?id=1107
hngc> Para consultar mensagens antigas: http://firebase.com.br/pesquisa





Mais detalhes sobre a lista de discussão lista