database - Variables in SQL script -


I am trying to create a script that accepts different values ​​from a user and incorporates them into the database. For values, HN names and surnames, I want to use these to search the database for my corisponding code, and then insert the data into the DB. I got this to work in a different script when I did it with a variable but I can not get it to work with two, I get the following error:

  Enter a line number: Enter a description for 1 item: Enter an amount for 5 lbs items: Enter a prominent category for 30.49 items: Old Old 13: WHERE name = '& amp; HName '; New 13: WHERE name = 'grocery'; Old 22: WHERE name = 'and sub-name' new 22: WHERE name = 'meat' old 28: value (and expanm, and linenum, 'and dccr, amt, encode, SCODA); New 28: Price (1, 1, '5 lbs', 30.49, HSID, SOCD); Acceptable surname Prompt 'Enter a sub-key category for the item:'; * Error 17 in line: ORA-0650: Line 17, Column 9: PLS-00103: Expected one of the following "SUBNAME" symbols encountered: =. (@%;   

I tried to split them into two different drives, BEGIN, END blocks, but still I get an error that I guess because I The second one can not enter the variable. My script is below if someone can give you any help / advice / tips to thank you.

  Exemplate Number Property Enter an expense number: '; SELECT * to EXPDET where expant = & amp; ExpNum; line number Please enter a line number: Enter a description for the '; ACCEPT Descr PROMPT' item: Enter an amount for the 'ATP AMT Prompt' item: '; ACCEPT HName PROMPT' for the item Category: '; DECLARE HEADCode NUMBER; HCode Number; SOCD Number; Select from Head to HeadCode name = '& amp; HNName; HCDID = HeadCode; ACCET Subnormal Prompt; Enter Sub Head Category for item:'; In the subcode in subcode Name from sub-location = '& amp; SubName' and HC Ode = HCode; six: = subcodes; insert in the expat value (and expant), & amp; linename, '& amp; Descr ', & amp; Amp; AMT, encoding, SCODA); End; I think you can not write sqlplus command in plsql code        

Move the following code out of the plsql block:
  Enter a sub-main category for the 'ACCEPT subnote prompt' item: ';    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -