DBA Data[Home] [Help]

APPS.ONT_OIP_COMMON SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 25

  select distinct  def.name hold_name,
         def.hold_id
  from oe_order_headers_all h,
       oe_order_holds_all hold,
       oe_hold_sources_all src,
       oe_hold_definitions def
  where h.header_id=hold.header_id
  and hold.hold_source_id=src.hold_source_id
  and hold.line_id IS NULL
  and src.hold_id=def.hold_id
  and hold.released_flag='N'
  and h.header_id = pEntityid;
Line: 40

  select distinct def.name hold_name,
         def.hold_id
  from oe_order_lines_all l,
       oe_order_holds_all hold,
       oe_hold_sources_all src,
       oe_hold_definitions def
  where hold.header_id=l.header_id
  and hold.line_id=l.line_id
  and hold.hold_source_id=src.hold_source_id
  and src.hold_id=def.hold_id
  and hold.released_flag='N'
  and l.line_id=pEntityId;
Line: 89

  select DISTINCT csv.name Name -- bug 10632055
  from csi_t_txn_line_details  clid
     , csi_t_transaction_lines  csitl
     , csi_systems_vl csv
  where csitl.SOURCE_TRANSACTION_ID = pLineId
  and   csitl.TRANSACTION_LINE_ID = clid.TRANSACTION_LINE_ID
  and   clid.csi_system_id = csv.system_id;
Line: 126

SELECT DISTINCT
      fm_serial_number,
      to_serial_number
FROM  wsh_serial_numbers
WHERE delivery_detail_id = pDeliveryDetailId;
Line: 173

  SELECT Role.cust_account_role_id ContactID,
         Party.person_first_name UserFName,
         Party.person_last_name UserLName,
         Party.email_address UserEmail,
         Party.party_name CustName,
         Role.cust_account_id CustomerId,
         nvl(Role.cust_acct_site_id, 0) CustomerAddrID
  FROM   fnd_user fnd,
         hz_parties Party,
         hz_cust_account_roles ROLE,
         hz_relationships Rel
  WHERE  Party.party_id = fnd.customer_id
  AND    Party.party_type = 'PERSON'
  AND    Role.current_role_state = 'A'
  AND    Role.role_type = 'CONTACT'
  -- AND    Role.cust_acct_site_id IS NULL -- bug 12616799
  AND   (Role.end_date IS NULL OR Role.end_date > SYSDATE)
  AND    Rel.subject_id = fnd.customer_id
  AND    Rel.party_id = Role.party_id
  AND    Rel.subject_type = 'PERSON'
  AND   (Rel.end_date IS NULL OR Rel.end_date > SYSDATE)
  AND    Rel.status = 'A'
  AND    Rel.subject_table_name = 'HZ_PARTIES'
  AND    fnd.user_id = pUserId
  UNION
  SELECT roles.cust_account_role_id,
         party.person_first_name,
	       party.person_last_name,
	       party.email_address,
	       party.party_name,
	       roles.cust_account_id,
	       nvl(roles.cust_acct_site_id,0)
  FROM   fnd_user fnd,
         hz_parties party,
         hz_cust_account_roles roles
  WHERE  fnd.customer_id = party.party_id
  AND    party.party_type='PARTY_RELATIONSHIP'
  AND    party.party_id = roles.party_id
  AND    roles.status ='A'
  AND    party.status='A'
  AND    fnd.user_id=pUserID
  UNION
  SELECT 0 ContactID,
         party.person_first_name UserFName,
         party.person_last_name UserLName,
         party.email_address UserEmail,
         party.party_name CustName,
         cust.cust_account_id CustomerId,
         0 CustomerAddrID
  FROM   fnd_user fnd,
         hz_parties party,
         hz_cust_accounts cust
  WHERE  fnd.customer_id = party.party_id
  AND    party.party_type = 'PERSON'
  AND    party.status = 'A'
  AND    cust.party_id = party.party_id
  AND    cust.status = 'A'
  AND    fnd.user_id = pUserId;
Line: 309

  select roles.cust_account_role_id,
         party.person_first_name,
	 party.person_last_name,
	 party.email_address,
	 party.party_name,
	 roles.cust_account_id,
	 nvl(roles.cust_acct_site_id,0)
  from   fnd_user fnd,
         hz_parties party,
         hz_cust_account_roles roles
  where  fnd.customer_id = party.party_id
  and    party.party_type='PARTY_RELATIONSHIP'
  and    party.party_id = roles.party_id
  and    roles.status ='A'
  and    party.status='A'
  and    fnd.user_id=lUserID
  UNION     -----added the below query for bug# 7456410 ,8467122
   SELECT
   Nvl(NULL,0) ,
   party.person_first_name,
   party.person_last_name,
   party.email_address,
   party.party_name,
   cust.cust_account_id ,
   Nvl(NULL,0)
   FROM
   fnd_user fnd,
   hz_parties party,
   hz_cust_accounts cust
   WHERE fnd.customer_id = party.party_id
   AND party.party_type='PERSON'
   AND party.status = 'A'
   AND cust.party_id=party.party_id
   AND fnd.user_id=lUserID;
Line: 395

            select party.person_first_name,
                   party.person_last_name,
                   rel_party.email_address,
                   cust_party.party_name,
                   cst.cust_account_id,
                   nvl(con.cust_acct_site_id,0)
	    INTO gUserFName,
		 gUserLName,
		 gUserEmail,
		 gCustName ,
		 gCustomerID,
		 gCustomerAddrID
            from hz_cust_accounts cst,
                 hz_parties cust_party,
                 hz_cust_account_roles con,
                 hz_parties party,
                 hz_parties rel_party,
                 hz_relationships rel,
                 hz_cust_accounts acct
            where
                 cst.cust_account_id = con.cust_account_id
                 and con.cust_account_role_id = gContactID
                 and rownum = 1
                 and cst.party_id = cust_party.party_id
                 and con.party_id = rel.party_id
                 and con.role_type = 'CONTACT'
                 and rel.subject_id = party.party_id
                 and rel.subject_table_name = 'HZ_PARTIES'
                 and rel.object_table_name = 'HZ_PARTIES'
                 and rel.object_id = acct.party_id
                 and acct.cust_account_id = con.cust_account_id
                 and rel.party_id = rel_party.party_id;
Line: 517

        SELECT meaning
        INTO   l_released_status_name
        FROM   wsh_lookups
        WHERE  lookup_type = 'PICK_STATUS'
        AND    lookup_code = 'I';
Line: 531

           SELECT meaning
           INTO   l_released_status_name
           FROM   wsh_lookups
           WHERE  lookup_type = 'PICK_STATUS'
           AND    lookup_code = 'K';
Line: 537

           SELECT meaning
           INTO   l_released_status_name
           FROM   wsh_lookups
           WHERE  lookup_type = 'PICK_STATUS'
           AND    lookup_code = p_released_status;
Line: 613

  select To_Char(p_price*decode(p_line_category_code,'RETURN',-1,1),l_format_mask)
   into x_price_formatted
   from dual;