Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- update PublicacoesPNCPDocumentos
- set IDOrgao = contratos.idorgao
- from PublicacoesPNCPDocumentos
- inner join contratos on PublicacoesPNCPDocumentos.idcontrato = contratos.idcontrato
- where publicacoespncpdocumentos.idcontrato is not null
- update publicacoespncpdocumentos
- set IDOrgao = solicitacoes.idorgao
- from PublicacoesPNCPDocumentos
- inner join solicitacoes on PublicacoesPNCPDocumentos.idsol = solicitacoes.idsol
- where publicacoespncpdocumentos.idsol is not null
- update publicacoespncpdocumentos
- set IDOrgao = 17
- where idsol is null and idcontrato is null
- select count(*)
- from PublicacoesPNCPDocumentos where idcontrato is not null
- select count(*)
- from PublicacoesPNCPDocumentos where idsol is not null
- select * from publicacoespncpdocumentos
- where idorgao = 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement