Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT DISTINCT TOP 100 ci.DATA, ci.Documento, cm.Utilizador AS 'User Gravação | CBL', m.Descricao, CAST(m.DataGravacao AS DATE)
- FROM Movimentos m WITH (NOLOCK)
- INNER JOIN CabecMovCBL cm WITH (NOLOCK) ON m.IdCabec = cm.Id
- INNER JOIN CabecInternos ci WITH (NOLOCK) ON cm.IdDocOrig = ci.Id
- WHERE m.Documento IN ('CENT') AND m.Serie IN ('2022A')
- ORDER BY ci.DATA DESC, ci.Documento, cm.Utilizador, m.Descricao, CAST(m.DataGravacao AS DATE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement