The following lines contain the word 'select', 'insert', 'update' or 'delete':
JTF_DIAGNOSTIC_COREAPI.insert_style_sheet;
sqltxt := 'select mp.organization_code|| '' (''||moqd.organization_id ||'')'' "Organization|Code (Id)"' ||
' ,mif.item_number|| '' (''||moqd.inventory_item_id||'')'' "Item (Id)" ' ||
' ,moqd.subinventory_code "Subinv", moqd.locator_id "Loc id",moqd.lot_number "Lot number",moqd.revision "Rev" ' ||
' from mtl_onhand_quantities_detail moqd,' ||
' mtl_parameters mp,mtl_item_flexfields mif' ||
' where moqd.organization_id = mp.organization_id' ||
' and moqd.inventory_item_id = mif.inventory_item_id' ||
' and moqd.organization_id = mif.organization_id' ||
' and moqd.revision is null ' ||
' and moqd.organization_id = ' || l_org_id ||
' and exists (select 1 from mtl_system_items ' ||
' where inventory_item_id = moqd.inventory_item_id ' ||
' and organization_id = moqd.organization_id ' ||
' and revision_qty_control_code = 2)' ||
' group by ' ||
' mp.organization_code || '' ('' || moqd.organization_id || '')'',' ||
' mif.item_number|| '' (''||moqd.inventory_item_id||'')'',' ||
' moqd.inventory_item_id, moqd.subinventory_code, moqd.locator_id, moqd.lot_number, moqd.revision' ;
sqltxt := ' select ' ||
' mp.organization_code || '' ('' || t.organization_id || '')'' "Organization|Code (Id)"' ||
' ,mif.item_number|| '' (''||t.inventory_item_id||'')'' "Item (Id)" ,' ||
' t.subinventory_code "Subinv", t.locator_id "Locator_id", t.lot_number "Lot num", t.revision "Rev"' ||
' from temp_disc_inv_cg_loose t, mtl_parameters mp, mtl_item_flexfields mif' ||
' where ' ||
' t.organization_id = mp.organization_id(+)' ||
' and t.inventory_item_id = mif.inventory_item_id(+)' ||
' and t.organization_id = mif.organization_id(+)' ||
' and t.revision is null' ||
' and exists (select 1 from mtl_system_items ' ||
' where inventory_item_id = t.inventory_item_id ' ||
' and organization_id = t.organization_id ' ||
' and revision_qty_control_code =2 )' ||
' group by ' ||
' mp.organization_code || '' ('' || t.organization_id || '')'',' ||
' mif.item_number|| '' (''||t.inventory_item_id||'')'',' ||
' t.inventory_item_id, t.subinventory_code, t.locator_id, t.lot_number, t.revision' ;