Skip to content

Instantly share code, notes, and snippets.

@arbo-hacker
Created February 4, 2016 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arbo-hacker/f0458a3156b9424b5d74 to your computer and use it in GitHub Desktop.
Save arbo-hacker/f0458a3156b9424b5d74 to your computer and use it in GitHub Desktop.
Ordenes de compra que fueron publicadas en RIB
-- Query para determinar si las ordenes de compra fueron publicadas en RIB
select published, count(1)
from (
select distinct opi.*
from ordloc ol, ordhead oh, order_pub_info opi
where ol.location = 49
and oh.order_no = ol.order_no
and ol.order_no = opi.order_no
)
group by published;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment