Osvaldo Rosario Kussama escreveu:
> bdteste=# UPDATE teste SET coluna1 = t_aux.coluna1+1
> FROM (
> SELECT coluna1
> FROM teste
> ORDER BY coluna1 DESC
> ) t_aux
> WHERE teste.coluna1 = t_aux.coluna1;
Blz Osvaldo, agora funcionou certinho
resolvi colocar o código que vc passou na minha tabela oficial
daí funcinou !
o comando ficou assim:
UPDATE MENU SET MENU_NIVEL1 = (T_AUX.MENU_NIVEL1 - 1)
FROM (SELECT MENU_NIVEL1 FROM MENU WHERE MENU_NIVEL1 >
:MENU_NIVEL1 ORDER BY MENU_NIVEL1 ASC) T_AUX
WHERE MENU.MENU_NIVEL1 = T_AUX.MENU_NIVEL1
funcionou perfeito !
agora se o DEFERRABLE funcionar vai ficar mais simples ainda !
muito obrigado !!
--
Evandro Andersen
(43)3323-4641 - (43)9125-6752
msn: [EMAIL PROTECTED]
Power Cobol 5.0
Crystal Reports 8.5
Postgresql 8.2.5
Windows 2003 Server SP2
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral