Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query help please

Status
Not open for further replies.

whtisthat

Technical User
Mar 27, 2004
12
US
I have 8 org_id and more then 10000 order_number I need to find the distinct org_id and just 1 order_number in all org_id to test there currency may be org_id,order_number,currency from oe_order_headers_all

Thanks
 
select
org_id
, order_number
, currency
from
oe_order_headers_all
where rownum =1
 
sir
with that query I am only getting one org_id if i want muntiple org_id and order_num how can I do that

Thanks
 
select distinct
org_id
, (select order_number from oe_order_headers_all where org_id = a.org_id and rownum=1) order_number
from
oe_order_headers_all a
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top