oracle - Issue while executing the PL/SQL conditional statements -


when try update few table ebtries based on table column value, facing following issue.

pl/sql query:

declare    buildval number; begin     select buildversion      buildval      wcsdba.builddetails     buildid =1;     if (buildval = 0)          update wcsdba.builddetails              set buildversion = 1,                  builddescription = 'firstversion'              buildid =1;         commit;     end if; end; 

exception:

query failed because:  ora-06550: line 9, column 3:  pls-00103: encountered symbol "end-of-file" when expecting 1 of following: ; symbol ";" substituted "end-of-file" continue. 

any or suggestions on same

declare    buildval number; begin    select buildversion buildval wcsdba.builddetails buildid =1;     if (buildval = 0)          update wcsdba.student set stversion =1;         update wcsdba.builddetails set buildversion = 1, builddescription = 'firstversion' buildid =1; --in line         commit;     end if; -- here end; 

try 1 please, forgot semi colon after end if , separated update columns and instead of comma


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -