Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.31 KB | None | 0 0
  1. SELECT
  2. rdb$get_context('USER_TRANSACTION', 'row#') AS codaod,
  3.  
  4. aod.codaos,
  5. aod.documento,
  6. aod.valor,
  7.  
  8. rdb$set_context('USER_TRANSACTION', 'row#', COALESCE(CAST(rdb$get_context('USER_TRANSACTION', 'row#') AS INTEGER), 0) + 1)
  9.  
  10. FROM
  11.     apontamentosos_documentos aod
  12. ORDER BY
  13.     aod.codaos,
  14.     aod.documento
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement