The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT doctype_id
FROM pon_auc_doctypes;
select nvl(r.validity_flag,'N')
into g_monitor_rules(doctype.doctype_id)
from pon_auc_doctype_rules r, pon_auc_bizrules biz
where biz.name = 'USE_AUCTION_MONITOR'
and r.bizrule_id = biz.bizrule_id
and r.doctype_id = doctype.doctype_id;
select decode(nvl(r.fixed_value,'NONE'),'COMMIT','Y','N')
into g_offer_rules(doctype.doctype_id)
from pon_auc_doctype_rules r, pon_auc_bizrules biz
where biz.name = 'AWARD_TYPE'
and r.bizrule_id = biz.bizrule_id
and r.doctype_id = doctype.doctype_id;
SELECT pst.team_id
FROM pon_scoring_teams pst,
pon_scoring_team_members pstm
WHERE pst.auction_header_id = pstm.auction_header_id
AND pst.team_id = pstm.team_id
AND pst.price_visible_flag = 'Y'
AND pstm.auction_header_id = p_cur_auction_header_id
AND pstm.user_id = FND_GLOBAL.user_id;
SELECT menu_name INTO l_menu_name
FROM pon_neg_team_members
WHERE auction_header_id = p_auction_header_id
AND list_id = -1
AND user_id = FND_GLOBAL.user_id;
SELECT internal_name
INTO l_doc_type
FROM PON_AUC_DOCTYPES
WHERE doctype_id = p_doctype_id;
IF (p_auction_status IN ('DRAFT','DELETED','AMENDED')) THEN
RETURN 'N';
Once they are moved to OAF, this function needs to be updated.
======================================================================*/
FUNCTION DISCUSSION_URL (p_auction_id IN NUMBER,
p_viewer_party_id IN NUMBER,
p_app IN VARCHAR2,
p_subtab_pos IN VARCHAR2) RETURN VARCHAR2
IS
v_discussion_id NUMBER;
select discussion_id
from pon_discussions
where entity_name = 'PON_AUCTION_HEADERS_ALL' and
pk1_value = to_char(p_auction_id);
select name
into v_time_zone_name
from fnd_timezones_vl
where upgrade_tz_id = to_number(v_client_timezone);
SELECT nvl(two_part_flag, 'N'), nvl(technical_lock_status, 'N')
INTO v_two_part_flag, v_technical_lock_status
FROM pon_auction_headers_all
WHERE auction_header_id = p_auction_id;
select max(ah.auction_header_id)
into v_most_recent_auction_id
from pon_auction_headers_all ah,
pon_auction_headers_all ah2
where ah.auction_status <> 'DRAFT'
and ah.auction_header_id_orig_amend = ah2.auction_header_id_orig_amend
and ah2.auction_header_id = p_auction_id;
select auction_status,
decode(sign(close_bidding_date - sysdate), 1, 'NOT_CLOSED', 'CLOSED')
into v_auction_status,
v_bidding_status
from pon_auction_headers_all
where auction_header_id = v_most_recent_auction_id;
SELECT
hl.location_code,
hl.address_line_1,
hl.address_line_2,
hl.address_line_3,
hl.town_or_city,
hl.region_2,
hl.region_3,
hl.postal_code,
hl.postal_code,
hl.country,
hl.region_1
INTO
v_address_name,
v_address_1,
v_address_2,
v_address_3,
v_city,
v_state,
v_province_or_region,
v_zip_code,
v_postal_code,
v_country,
v_county
FROM hr_locations hl
WHERE hl.location_id = p_location_id;
SELECT
tl.territory_short_name
INTO v_territory_name
FROM fnd_territories_tl tl
WHERE tl.territory_code = v_country
AND tl.territory_code NOT IN ('ZR','FX','LX')
AND tl.language = p_language;
select bid_number
from pon_bid_headers
where auction_header_id = p_auction_header_id and
trading_partner_id = p_trading_partner_id and
bid_status = 'ACTIVE';
select substrb(to_char(bid_number)||(decode (bid_revision_number,null,'','-'||to_char(bid_revision_number))),0,10) bid_number_display,
bid_number
from pon_bid_headers
where auction_header_id = p_auction_header_id and
trading_partner_id = p_trading_partner_id and
bid_status = 'ACTIVE' and
nvl(award_status,'NONE') <> 'COMMITTED';
SELECT count(*)
INTO v_number_of_bids
FROM pon_bid_headers
WHERE auction_header_id = p_auction_header_id and
trading_partner_id = p_trading_partner_id and
bid_status = 'ACTIVE' and
nvl(award_status,'NONE') <> 'COMMITTED';
SELECT count(*)
INTO v_number_of_bids
FROM pon_bid_headers
WHERE auction_header_id = p_auction_header_id and
trading_partner_id = p_trading_partner_id and
bid_status = 'ACTIVE';
SELECT count(*)
INTO v_active_bids_count
FROM pon_bid_headers bh
, pon_bid_item_prices bl
WHERE bh.auction_header_id = p_auction_header_id
and bh.bid_status = 'ACTIVE'
--added by Allen Yang for Surrogate Bid 2008/09/26
-------------------------------------------------------
and (bh.submit_stage is null or bh.submit_stage <> 'TECHNICAL')
-------------------------------------------------------
and bl.bid_number = bh.bid_number
and bl.line_number = p_line_number;
SELECT category_id, fnd_attached_documents_s.nextval
INTO l_category_id, l_attached_document_id
FROM fnd_document_categories
WHERE name = p_category_name;
fnd_attached_documents_pkg.insert_row (
x_rowid => l_rowid ,
x_attached_document_id =>l_attached_document_id,
x_document_id => l_document_id ,
x_creation_date => SYSDATE ,
x_created_by => fnd_global.user_id ,
x_last_update_date => SYSDATE ,
x_last_updated_by => fnd_global.user_id ,
x_last_update_login => fnd_global.login_id ,
x_seq_num => p_seq_num ,
x_entity_name => p_entity_name ,
x_column1 => NULL ,
x_pk1_value => p_pk1_value ,
x_pk2_value => p_pk2_value ,
x_pk3_value => p_pk3_value ,
x_pk4_value => p_pk4_value ,
x_pk5_value => p_pk5_value ,
x_automatically_added_flag => 'N' ,
x_request_id => NULL ,
x_program_application_id =>NULL ,
x_program_id => NULL ,
x_program_update_date => NULL ,
x_attribute_category => NULL ,
x_attribute1 => NULL ,
x_attribute2 => NULL ,
x_attribute3 => NULL ,
x_attribute4 => NULL ,
x_attribute5 => NULL ,
x_attribute6 => NULL ,
x_attribute7 => NULL ,
x_attribute8 => NULL ,
x_attribute9 => NULL ,
x_attribute10 => NULL ,
x_attribute11 => NULL ,
x_attribute12 => NULL ,
x_attribute13 => NULL ,
x_attribute14 => NULL ,
x_attribute15 => NULL ,
x_datatype_id => p_datatype_id ,
x_category_id => l_category_id ,
x_security_type => 4 ,
x_security_id => NULL ,
x_publish_flag => 'Y' ,
x_image_type => NULL ,
x_storage_type => NULL ,
x_usage_type => 'O' ,
x_language => USERENV('LANG') ,
x_description => p_document_description ,
x_url => p_url ,
x_media_id => l_media_id ,
x_doc_attribute_category => NULL ,
x_doc_attribute1 => NULL ,
x_doc_attribute2 => NULL ,
x_doc_attribute3 => NULL ,
x_doc_attribute4 => NULL ,
x_doc_attribute5 => NULL ,
x_doc_attribute6 => NULL ,
x_doc_attribute7 => NULL ,
x_doc_attribute8 => NULL ,
x_doc_attribute9 => NULL ,
x_doc_attribute10 => NULL ,
x_doc_attribute11 => NULL ,
x_doc_attribute12 => NULL ,
x_doc_attribute13 => NULL ,
x_doc_attribute14 => NULL ,
x_doc_attribute15 => NULL
);
SELECT COUNT(1)
INTO l_member_cnt
FROM pon_neg_team_members pntm
WHERE pntm.auction_header_id = p_auction_header_id
AND (pntm.user_id <> p_user_id
OR EXISTS(SELECT 1
FROM pon_thread_entries pte
WHERE pte.discussion_id = p_discussion_id
AND pte.from_id <> p_trading_partner_contact_id
AND pte.vendor_id IS NULL
)
);
SELECT count(1)
INTO v_is_manager_present
FROM per_all_assignments_f ass,
fnd_user sup,
fnd_user emp,
per_all_people_f per
WHERE ass.person_id = emp.employee_id
AND ass.supervisor_id = sup.employee_id
AND ass.primary_flag = 'Y'
AND ass.assignment_type = 'E'
AND TRUNC(sysdate) BETWEEN ass.effective_start_date
AND ass.effective_end_date
AND sup.start_date <= sysdate
AND nvl(sup.end_date, sysdate) >= sysdate
AND per.person_id = sup.employee_id
AND emp.user_id = p_user_id
AND TRUNC(SYSDATE) BETWEEN per.effective_start_date AND per.effective_end_date
AND rownum = 1;
SELECT message_text
INTO v_display_approval_status
FROM fnd_new_messages
WHERE application_id = 396
AND language_code = userenv('LANG')
AND message_name = v_approval_status;