The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE UPDATE_DATE IS
l_count number;
SELECT count(1) INTO l_count from BIS_SYSTEM_DATE;
IF (l_count = 0) THEN /* INSERT DATE */
INSERT INTO BIS_SYSTEM_DATE(current_date_id)
values (trunc(sysdate));
ELSIF (l_count = 1) THEN /* Exists, update if needed */
UPDATE BIS_SYSTEM_DATE
set current_date_id = trunc(sysdate)
WHERE trunc(sysdate) <> trunc(current_date_id);
SELECT value into l_dir
FROM v$parameter where upper(name) = 'UTL_FILE_DIR';
/* Update the System Date table if necessary */
UPDATE_DATE ;
insert into bis_refresh_log(
Request_id,
Concurrent_id,
Object_name,
Status,
Start_date,
Period_from,
Period_to,
Number_processed_record,
Exception_message,
Creation_date,
Created_by,
Last_update_date,
Last_update_login,
Last_updated_by,
Attribute1, Attribute2, Attribute3, Attribute4,
Attribute5, Attribute6, Attribute7, Attribute8,
Attribute9, Attribute10 )
values
(g_request_id,
g_concurrent_id,
g_object_name,
l_status,
g_start_date,
p_period_from,
p_period_to,
p_count,
p_message,
sysdate,
g_user_id,
sysdate,
g_login_id,
g_user_id,
p_attribute1, p_attribute2, p_attribute3, p_attribute4,
p_attribute5, p_attribute6, p_attribute7, p_attribute8,
p_attribute9, p_attribute10 );
select 'Y'
into l_exist_flag
from fnd_concurrent_programs
where concurrent_program_name=p_program_short_name
and application_id=p_program_application_id;
SELECT MAX(period_to) INTO l_date
FROM bis_refresh_log
WHERE object_name = p_object_name AND
status='SUCCESS' AND
last_update_date =
(SELECT MAX(last_update_date)
FROM bis_refresh_log
WHERE object_name= p_object_name AND
status='SUCCESS' ) ;
select start_date, last_update_date, period_from, period_to
from bis_refresh_log
where object_name = p_obj_name and status='SUCCESS'
and last_update_date =( select max(last_update_date)
from bis_refresh_log
where object_name= p_obj_name and status='SUCCESS' ) ;
select attribute1, attribute2, attribute3, attribute4, attribute5,
attribute6,attribute7, attribute8, attribute9, attribute10,
attribute1||attribute2||attribute3||attribute4||attribute5||
attribute6||attribute7||attribute8||attribute9||attribute10
into p_attribute_table(1), p_attribute_table(2), p_attribute_table(3),
p_attribute_table(4), p_attribute_table(5), p_attribute_table(6),
p_attribute_table(7), p_attribute_table(8), p_attribute_table(9),
p_attribute_table(10), l_allattribute
from bis_refresh_log
where object_name = p_object_name and status='SUCCESS'
and last_update_date =( select max(last_update_date)
from bis_refresh_log
where object_name= p_object_name and status='SUCCESS' ) ;
p_attribute_table.delete;
p_attribute_table.delete;
SELECT user_conversion_type
FROM gl_daily_conversion_types
WHERE conversion_type = p_rate_type;
Procedure deleteLogForObject(p_object_name varchar2) IS
BEGIN
EXECUTE IMMEDIATE 'delete from bis_refresh_log where upper(object_name)=upper(:1) and error_type is null' using p_object_name;
OPEN cv for 'SELECT ORACLE_USERNAME from fnd_oracle_userid where oracle_id=900';
SELECT MAX(period_to) INTO l_date
FROM bis_refresh_log
WHERE object_name = p_object_name AND
status='FAILURE' AND
last_update_date = (
SELECT MAX(last_update_date)
FROM bis_refresh_log
WHERE object_name= p_object_name AND
status='FAILURE' ) ;
SELECT period_to, period_from INTO l_date_to,l_date_from
FROM bis_refresh_log
WHERE object_name = p_object_name AND
status='FAILURE' AND
last_update_date = (
SELECT MAX(last_update_date)
FROM bis_refresh_log
WHERE object_name= p_object_name AND
status='FAILURE' )AND
rownum = 1
ORDER BY period_to desc ;