Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. select s.id as idsp, ss.nome as estado, l.data as loaddata, s.nrencomenda as nrencomenda, s.nrpedido as nrpedido
  2. from sp s
  3. join loads l on s.idloads = l.id
  4. join spstatus ss on ss.id = s.estado
  5. where !exists
  6. (select idsp from pagamentos where idsp = s.id);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement