The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE insert_w3c_dtls(errbuf OUT nocopy VARCHAR2,
retcode OUT nocopy NUMBER,
p_seq_num IN VARCHAR2) is
cursor c_get_data(c_seq_num in VARCHAR2) is
SELECT tax_unit_id tax_unit_id,
nvl(attribute6,' ') employer_name,
nvl(attribute7,' ') federal_ein,
nvl(attribute4,' ') employee_name,
nvl(attribute5,' ') ssn,
nvl(attribute3,' ') record_type,
nvl(attribute2,' ') tax_year,
nvl(value1,0) wages_old,
nvl(value2,0) wages_new,
nvl(value3,0) fit_old,
nvl(value4,0) fit_new,
nvl(value5,0) ss_wages_old,
nvl(value6,0) ss_wages_new,
nvl(value7,0) ss_withheld_old,
nvl(value8,0) ss_withheld_new,
nvl(value9,0) medi_wages_old,
nvl(value10,0) medi_wages_new,
nvl(value11,0) medi_withheld_old,
nvl(value12,0) medi_withheld_new,
nvl(value13,0) ss_tips_old,
nvl(value14,0) ss_tips_new,
nvl(value15,0) alloc_tips_old,
nvl(value16,0) alloc_tips_new,
nvl(value17,0) eic_old,
nvl(value18,0) eic_new,
nvl(value19,0) depcare_old,
nvl(value20,0) depcare_new,
nvl(value21,0) nonqual_old,
nvl(value22,0) nonqual_new,
nvl(value23,0) third_party_sick_old,
nvl(value24,0) third_party_sick_new,
nvl(attribute9,' ') box_12_code,
to_number(nvl(attribute10,0)) box_12_value_old,
to_number(nvl(attribute11,0)) box_12_value_new,
nvl(attribute12,' ') box_14_code ,
nvl(attribute13,0) box_14_value_old, -- Bug 5562494 to_number(nvl(attribute13,0))
nvl(attribute14,0) box_14_value_new, -- to_number(nvl(attribute14,0))
nvl(attribute15,' ') state_abbrev,
nvl(attribute16,' ') state_id_number,
nvl(attribute17,' ') state_inco_id_number,
to_number(nvl(attribute18,0)) ss_wages_tips_old,
to_number(nvl(attribute19,0)) ss_wages_tips_new,
to_number(nvl(attribute20,0)) sit_old,
to_number(nvl(attribute21,0)) sit_new,
nvl(attribute22,' ') state_local_name,
to_number(nvl(attribute23,0)) local_wages_old,
to_number(nvl(attribute24,0)) local_wages_new,
to_number(nvl(attribute25,0)) local_withheld_old,
to_number(nvl(attribute26,0)) local_withheld_new,
nvl(attribute27,' ') incorrect_name,
nvl(attribute28,' ') incorrect_ssn
FROM pay_us_rpt_totals
WHERE session_id = to_number(c_seq_num)
AND attribute3 in ('FEDERAL','BOX 12','BOX 14','STATE','LOCAL')
order by attribute4,
attribute5,
decode(attribute3,'FEDERAL','1',
'BOX 12','2',
'BOX 14','3',
'STATE','4',
'LOCAL','5','6') ;
DELETE FROM pay_us_rpt_totals
WHERE session_id = p_seq_num ;