Search from 700 + Posts

Apr 18, 2017

Query to extract data from ASO Quote Header and lines table

Query to extract data from ASO Quote Header and lines table for items belongs to specific Category set.

SELECT ool.line_id, 
ooh.quote_name,ooh.quote_number,ooh.quote_status_id,qs.status_code,ool.line_number,
mib.segment1,mib.description,
ool.quantity,
ooh.quote_source_code,
mic.inventory_item_id,
mic.organization_id,cs.CATEGORY_SET_ID--,cs.*
        FROM apps.mtl_category_sets_tl cs  ,
             apps.mtl_category_sets_b csb,
             apps.mtl_item_categories mic,
             apps.aso_quote_lines_all ool,
             apps.aso_quote_headers_all ooh,
             mtl_system_items_b mib,
             aso_quote_statuses_b qs
      WHERE cs.category_set_id = csb.category_set_id
       AND cs.category_set_id = mic.category_set_id
       AND category_set_name = 'XXXBIZ'
       AND mic.inventory_item_id = ool.inventory_item_id
       AND mic.organization_id = ool.organization_id
       and ool.quote_header_id = ooh.quote_header_id
       and ooh.quote_status_id = qs.quote_status_id
       AND mic.inventory_item_id = mib.inventory_item_id
       AND mic.organization_id = mib.organization_id

No comments:

Post a Comment