Posts by Elton C Ramos • 1 point
1 post
-
0
votes2
answers3449
viewsA: Get only last query sql server record
Can test: SELECT * FROM TABELA A WHERE A.DATA = (SELECT MAX(A1.DATA) FROM TABELA A1 WHERE A1. CHAVE = A.CHAVE... AND A1.DATA <= SYSDATE); Note: If it is Oracle it is SYSDATE. SELECT A.CODIGO,…