plsql related issue
-
create or replace function Registration_Click(paitent_1 IN character varying,card_no IN character varying,dis_name IN character varying,taluka_name IN character varying,village_name IN character varying,po_name IN character varying,co_name IN character varying,occupation IN character varying,doc_name IN character varying,RefByType_name IN character varying,city_name IN character varying,state_name IN character varying,country_name IN character varying,body_name IN character varying,mob_no IN character varying,opd_id IN character varying,comboboxtitle_title_name IN character varying,comboboxco_title_name IN character varying,name_1 OUT character varying, id_246 OUT character varying,name_2 OUT character varying,max_date_id OUT character varying,max_dis_id OUT character varying,max_taluk_id OUT character varying,max_village_id OUT character varying,max_po_id OUT character varying,max_co_id OUT character varying,max_occupation OUT character varying,max_doc_id OUT character varying,mob_no_o OUT character varying, paitent_2 OUT character varying,id_1918 OUT character varying,f_name OUT character varying,comboboxtitle_title_id OUT character varying, comboboxco_title_id OUT character varying,auth_1 OUT character varying,city_name_o OUT character varying,state_name_o OUT character varying,std_code IN character varying,country_name_o OUT character varying,body_name_o OUT character varying ) AS $body$ declare temp varchar; BEGIN SELECT st_fname into name_1 FROM sc_register WHERE st_patient_id = paitent_1; SELECT st_value into id_246 from sc_setting where st_id =246; SELECT st_fname into name_2 from sc_register where st_pt_cardno = card_no; SELECT MAX(dt_doj) into max_date_id FROM sc_register; IF dis_name <> '' THEN SELECT si_district_id into max_dis_id FROM sc_district where st_districtname = dis_name; if max_dis_id IS NULL THEN SELECT max(si_district_id)into max_dis_id FROM sc_district; INSERT INTO sc_district values(max_dis_id,dis_name); END IF; END IF; IF taluka_name <> '' THEN SELECT si_talukid into max_taluk_id FROM sc_taluk where st_talukname=taluka_name; IF max_taluk_id IS NULL THEN SELECT max(si_talukid) into max_taluk_id FROM sc_taluk; INSERT INTO sc_taluk values(max_taluk_id,taluka_name); END IF; END IF; IF village_name <> '' THEN SELECT si_villageid INTO max_village_id FROM sc_village where st_villagename=village_name;
-
create or replace function Registration_Click(paitent_1 IN character varying,card_no IN character varying,dis_name IN character varying,taluka_name IN character varying,village_name IN character varying,po_name IN character varying,co_name IN character varying,occupation IN character varying,doc_name IN character varying,RefByType_name IN character varying,city_name IN character varying,state_name IN character varying,country_name IN character varying,body_name IN character varying,mob_no IN character varying,opd_id IN character varying,comboboxtitle_title_name IN character varying,comboboxco_title_name IN character varying,name_1 OUT character varying, id_246 OUT character varying,name_2 OUT character varying,max_date_id OUT character varying,max_dis_id OUT character varying,max_taluk_id OUT character varying,max_village_id OUT character varying,max_po_id OUT character varying,max_co_id OUT character varying,max_occupation OUT character varying,max_doc_id OUT character varying,mob_no_o OUT character varying, paitent_2 OUT character varying,id_1918 OUT character varying,f_name OUT character varying,comboboxtitle_title_id OUT character varying, comboboxco_title_id OUT character varying,auth_1 OUT character varying,city_name_o OUT character varying,state_name_o OUT character varying,std_code IN character varying,country_name_o OUT character varying,body_name_o OUT character varying ) AS $body$ declare temp varchar; BEGIN SELECT st_fname into name_1 FROM sc_register WHERE st_patient_id = paitent_1; SELECT st_value into id_246 from sc_setting where st_id =246; SELECT st_fname into name_2 from sc_register where st_pt_cardno = card_no; SELECT MAX(dt_doj) into max_date_id FROM sc_register; IF dis_name <> '' THEN SELECT si_district_id into max_dis_id FROM sc_district where st_districtname = dis_name; if max_dis_id IS NULL THEN SELECT max(si_district_id)into max_dis_id FROM sc_district; INSERT INTO sc_district values(max_dis_id,dis_name); END IF; END IF; IF taluka_name <> '' THEN SELECT si_talukid into max_taluk_id FROM sc_taluk where st_talukname=taluka_name; IF max_taluk_id IS NULL THEN SELECT max(si_talukid) into max_taluk_id FROM sc_taluk; INSERT INTO sc_taluk values(max_taluk_id,taluka_name); END IF; END IF; IF village_name <> '' THEN SELECT si_villageid INTO max_village_id FROM sc_village where st_villagename=village_name;
Haha, I love it, dump in your school work code, don't ask a question but ask for a solution. Try reading the guidelines on asking a question.
Never underestimate the power of human stupidity RAH