Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. plsql related issue

plsql related issue

Scheduled Pinned Locked Moved Database
oraclehelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11886269
    wrote on last edited by
    #1

    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;

    M 1 Reply Last reply
    0
    • U User 11886269

      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;

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups