DBA Data[Home] [Help]

APPS.HZP_CUST_PKG SQL Statements

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

Line: 41

 	select 1
	into   dummy
	from   dual
	where  not exists ( select 1
	         	   from  hz_parties
		 	   where  party_name = p_customer_name
		 	   and    ( ( p_rowid is null ) or (rowid <> p_rowid))
			  );
Line: 86

	select 1
	into   dummy
	from   dual
	where  not exists ( select 1
	         	   from   hz_cust_accounts
		 	   where  account_number = p_customer_number
		 	   and    ( ( p_rowid is null ) or (rowid <> p_rowid))
			  );
Line: 131

        select 1
        into   dummy
        from   dual
        where  not exists ( select 1
                           from   hz_parties
                           where  party_number = p_party_number
                           and    ( ( p_rowid is null ) or (rowid <> p_rowid))
                          );
Line: 174

	select 1
	into   dummy
	from   dual
	where  not exists ( select 1
	         	   from   hz_cust_accounts c
		 	   where  c.orig_system_reference = p_orig_system_reference
		 	   and    ( ( p_rowid is null ) or (c.rowid <> p_rowid)));
Line: 213

  PROCEDURE delete_customer_alt_names(p_rowid IN VARCHAR2,
                                      p_status IN VARCHAR2,
                                      p_customer_id IN NUMBER) IS
    l_status VARCHAR2(1);
Line: 219

      SELECT status
      FROM   hz_cust_accounts
      WHERE  rowid = p_rowid;
Line: 239

          arp_cust_alt_match_pkg.delete_match(p_customer_id, NULL, NULL) ;
Line: 246

      arp_standard.debug('EXCEPTION: arp_cust_pkg.delete_customer_alt_names');
Line: 247

  END delete_customer_alt_names;
Line: 307

  select site_uses.site_use_id
  into   v_statement_site_use_id
  from   hz_cust_acct_sites acct_site,
         hz_cust_site_uses site_uses
  where  acct_site.cust_account_id    = p_customer_id
  and    site_uses.cust_acct_site_id    = acct_site.cust_acct_site_id
  and    site_uses.site_use_code = 'STMTS'
  and    site_uses.status        = 'A';
Line: 387

  select site_uses.site_use_id
  into   v_dunning_site_use_id
  from   hz_cust_acct_sites acct_site,
         hz_cust_site_uses site_uses
  where  acct_site.cust_account_id = p_customer_id
  and    site_uses.cust_acct_site_id    = acct_site.cust_acct_site_id
  and    site_uses.site_use_code = 'DUN'
  and    site_uses.status        = 'A';
Line: 430

 |     staged_dunning_level field of ar_payment_schedules is updateable      |
 |     or not.                                                               |
 |                                                                           |
 | MODIFICATION HISTORY                                                      |
 |                                                                           |
 |     30-JUN-1997  Neeraj Tandon    Created                                 |
 |                                                                           |
 +===========================================================================+*/
--
FUNCTION get_current_dunning_type (
              p_customer_id     IN hz_cust_accounts.cust_account_id%type,
              p_bill_to_site_id IN NUMBER
                                  )
  return varchar2 is
--
  v_dunning_site hz_cust_site_uses.site_use_id%type;
Line: 454

    select dls.dunning_type
    into   v_dunning_type
    from   hz_customer_profiles    prof,
           ar_dunning_letter_sets  dls
    where  prof.cust_account_id           = p_customer_id
    and    prof.site_use_id          is NULL
    and    prof.dunning_letter_set_id = dls.dunning_letter_set_id;
Line: 464

    select dls.dunning_type
    into   v_dunning_type
    from   hz_cust_site_uses       su,
           hz_cust_acct_sites      ad_cus,
           hz_customer_profiles    cust_pro,
           hz_customer_profiles    site_pro,
           ar_dunning_letter_sets  dls,
           hz_cust_accounts        cus
    where  su.site_use_code                = 'BILL_TO'
    and    su.status                       = 'A'
    and    su.site_use_id                  = p_bill_to_site_id
    and    ad_cus.cust_acct_site_id        = su.cust_acct_site_id
    and    ad_cus.status                   = 'A'
    and    cust_pro.cust_account_id        = ad_cus.cust_account_id
    and    cust_pro.site_use_id           is NULL
    and    cust_pro.status                 ='A'
    and    site_pro.site_use_id      (+)   = su.site_use_id
    and    site_pro.status           (+)   ='A'
    and    dls.dunning_letter_set_id    = nvl( site_pro.dunning_letter_set_id,
                                               cust_pro.dunning_letter_set_id )
    and    dls.status                      = 'A'
    and    cus.cust_account_id             = ad_cus.cust_account_id
    and    cus.status                      = 'A'
    and    cus.cust_account_id             = p_customer_id;
Line: 509

    SELECT   overall_credit_limit
    FROM     hz_cust_profile_amts
    WHERE    cust_account_id                  = p_customer_id
    AND      currency_code                    = p_currency_code
    AND      decode( p_customer_site_use_id,
                     NULL, -10,
                     p_customer_site_use_id ) = NVL( site_use_id, -10 );
Line: 531

       SELECT   trx_credit_limit
       FROM     hz_cust_profile_amts
       WHERE    cust_account_id = p_customer_id
       AND      currency_code = p_currency_code
       AND      DECODE( p_customer_site_use_id,
                        NULL, -10, p_customer_site_use_id ) =
                NVL( site_use_id, -10 );
Line: 556

         SELECT su.site_use_id
         FROM  hz_cust_site_uses su,
               hz_cust_acct_sites acct_site
         WHERE su.site_use_code = 'BILL_TO'
         and   su.cust_acct_site_id = acct_site.cust_acct_site_id
         and   acct_site.cust_account_id = p_customer_id
         and   su.primary_flag = 'Y'
         ORDER BY su.status, su.site_use_id DESC;