DBA Data[Home] [Help]

APPS.IGS_OR_VAL_OA SQL Statements

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

Line: 33

  		SELECT	count(*)
  		FROM	IGS_CO_ADDR_TYPE	adt
  		WHERE	adt.addr_type = p_addr_type;
Line: 38

  		SELECT	oa.addr_type,
  			oa.start_dt,
  			oa.end_dt
  		FROM	IGS_OR_ADDR	oa
  		WHERE	oa.org_unit_cd = p_org_unit_cd AND
		        oa.status = 'A' AND
		        oa.ou_start_dt = p_ou_start_dt AND
  			oa.addr_type <> p_addr_type AND
  			oa.correspondence_ind = 'Y';
Line: 149

  		SELECT	count(*)
  		FROM	IGS_OR_ADDR	oa
  		WHERE	oa.org_unit_cd = p_org_unit_cd AND
  			oa.ou_start_dt = p_ou_start_dt AND
			oa.status = 'A' AND
  			oa.start_dt <> p_start_dt AND
  			oa.addr_type = p_addr_type AND
  			oa.end_dt IS NULL;
Line: 196

  		SELECT	oa.start_dt,
  			oa.end_dt
  		FROM	IGS_OR_ADDR oa
  		WHERE	oa.org_unit_cd = cp_org_unit_cd AND
  			oa.ou_start_dt = cp_ou_start_dt AND
  			oa.addr_type = cp_addr_type AND
			oa.status = 'A' AND
  			oa.start_dt <> p_start_dt;
Line: 207

  	-- created or updated, does not overlap with an existing adress
  	-- record of the same type for the organisational IGS_PS_UNIT.
  	-- Set the default message number
  	p_message_name := NULL;
Line: 217

  	-- Loop through the selected IGS_OR_ADDR records,
  	-- validating each record for date overlaps.
  	-- Do not validate against the record passed in.
  	-- Validation will fail if any of the following are true -
  	--	a. The current start date is between an existing date range.
  	-- 	b. The current end date is between an existing date range.
  	-- 	c. The current dates overlap an entire existing date range.
  	FOR	v_oa_rec	IN	c_oa(
  						p_org_unit_cd,
  						p_ou_start_dt,
  						p_addr_type) LOOP
  		-- check if p_start_dt between existing date range.
  		IF (p_start_dt >= v_oa_rec.start_dt) AND
  			(p_start_dt <= NVL(v_oa_rec.end_dt, IGS_GE_DATE.IGSDATE('9999/01/01'))) THEN
  				p_message_name := 'IGS_EN_ADDRESS_DATES_OVERLAP';