Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> complex Sql

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: complex Sql
 Milkyway  Posted: Jun 05, 2007 12:50:27 AM

 Total Post: 1
 Joined: Jun, 2007






 Please help me to understand what this sql is doing,.

SELECT *
FROM (WITH locationnode_map AS (SELECT l_oid
, TO_NUMBER(SUBSTR(scbp,1,INSTR(scbp,'.')-1)) p_parent_oid
FROM (SELECT pn.oid l_oid,LTRIM(SYS_CONNECT_BY_PATH(pn.oid,'.'),'.') ||'.' scbp
FROM locationnode pn
WHERE pn.locationlevel_oid = 552
START WITH pn.OID in (5000)
CONNECT BY PRIOR pn.OID = pn.parent_oid
)
ORDER BY 2
)
SELECT /*+ index (sl idx_timenode) */ sl.timenode_oid t_oid
, SUM(on_order_cost) result
, sl.product_oid p_oid
, location.p_parent_oid l_oid
FROM location l
, locationnode_map location
, slma sl
WHERE sl.timenode_oid in (37, 38)
AND sl.product_oid = 3000310
AND sl.location_oid = l.oid
AND location.l_oid = l.locationnode_oid
GROUP BY sl.product_oid
, location.p_parent_oid
, sl.timenode_oid
)

 Vish
Posted: Jul 28, 2008 01:59:41 PM  

 Total Post: 47
 Joined: Jan, 2007






 
from where u get this query

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar843
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gitesh Trivedi322
  Gopu Gopi268
  neeraj sharma252
  Ramesh Jois245
  Bishal Khetan207






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software