mysql - showing error 1054 unknown column in stored procedure -


the following code procedure in sql

create definer=`@!!@@`@`#$#$#` procedure `pr_supplier_details`(      in pi_flag              varchar(1),     in pi_trdate            date,     /*in pi_company_id      int(10),*/     in pi_org_mst_id        int(5),     in pi_prifix            varchar(20),     in pi_supplier_name     varchar(60),     /* in pi_supplier_id        int(10), */     in pi_company_id        int(10),     in pi_address           varchar(200),     in pi_area              varchar(30),     in pi_city              varchar(30),     in pi_state             varchar(30),     in pi_pincode           varchar(10),     in pi_phno              varchar(20),     in pi_mobno             varchar(20),     in pi_email             varchar(30),     in pi_active_flag       varchar(1),     in pi_enter_user_id         int(14),     in pi_enter_desc        varchar(100),      inout pi_supplier_id    int(10),     inout pi_supplier_company_det_id    int(10)  )  begin     declare lv_add_id    int(14);     /*declare continue handler sqlexception     begin         rollback;     end;      declare exit handler sqlwarning     begin         rollback;     end;     */      start transaction;         if pi_flag = 'n'             insert a_deta(address_det_id,system_date,                                 trdate,address,area,city,                                 state,pin_code,phno,mobile_no,                                 email_id,website,active_flag,                                 enter_user_id,enter_desc)             values             (null,current_date,pi_trdate,             pi_address,pi_area,pi_city,pi_state,             pi_pincode,pi_phno,pi_mobno,pi_email,null,             'y',pi_enter_user_id,pi_enter_desc);      set lv_add_id = last_insert_id();      insert supp_det             a(supplier_id,system_date,trdate,org_mst_id,                 prifix,supplier_name,address_det_id,                 active_flag,enter_user_id,enter_desc)      values (null,current_date,pi_trdate,pi_org_mst_id,             pi_prifix,pi_supplier_name,lv_add_id,pi_active_flag,             pi_enter_user_id,pi_enter_desc);      set pi_supplier_id = last_insert_id();      insert supp_company_deta                    (pi_supplier_company_det_id,system_date,             trdate,supplier_id,company_id,             active_flag,enter_user_id,enter_desc)     values             (null,current_date,pi_trdate,pi_supplier_id,             pi_company_id,pi_active_flag,pi_enter_user_id,             pi_enter_desc);      set pi_supplier_company_det_id = last_insert_id();  end if;   if pi_flag = 'm'      select address_det_id lv_add_id      supp_deta      supplier_id = pi_supplier_id;      update a_deta           set address = pi_address,               area = pi_area,               city = pi_city,               state = pi_state,               pin_code = pi_pincode,               phno = pi_phno,               mobile_no = pi_mobno,               email_id = pi_email     address_det_id = lv_add_id;     update supp_deta         set trdate = pi_trdate,             org_mst_id = pi_org_mst_id,             prifix = pi_prifix,             supplier_name = pi_supplier_name,             active_flag = pi_active_flag,             enter_user_id = pi_enter_user_id    ,             enter_desc = pi_enter_desc     supplier_id = pi_supplier_id;    /*end if;*/  /*commit;*/       update supp_compa_deta          set trdate=pi_trdate,             supplier_id=pi_supplier_id,             company_id=pi_company_id,             active_flag=pi_active_flag,             enter_user_id=pi_enter_user_id,             enter_desc=pi_enter_desc     supplier_company_det_id=pi_supplier_company_det_id;  end if;  commit;  end 

while calling procedure showing following error

all pr_supp_deta('n',current_date(),2,'we','ghj',4,'fgg','sd','nag','ms',440024,456321,789654789,'fg.com','y',123,'192.168.1.12',@'dd',@'aa') error code: 1054. unknown column 'pi_supplier_company_det_id' in 'field list' 0.171 sec


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -