‎2020 Sep 26 3:23 AM
Hi
Good Morning
I am trying to create a procedure, however there is a error in VAR2 for incorrect syntax.
Checked the procedure but couldnt identify the same.
Could you please support.
Please refer to attachment.
Thanks in Advance......-create-procedures-protected-view-word.jpg
‎2020 Sep 26 5:18 AM
Hi bande_ramesh91,
Your procedure has a couple of syntax issues. Please fix that.
1. The VAR1 assignment should end with a semicolon(;) and that's why you are getting syntax error - (line no 11)
2. After fixing the above you would get an error at OUT_TABLE - (line no19).
The query should look like below:
SELECT SUM(SALES_AMOUNT) AS SALES_AMOUNT, SUM(SALES_AMOUNT-(SALES_AMOUNT*:DISCOUNT/100)) AS NET_AMOUNT....Thanks
‎2020 Sep 26 4:30 AM
Hi bande_ramesh91
your referring Var1 in Var2 block which Var1 is not present... Kindly create as a table and call it in var2
‎2020 Sep 26 5:18 AM
Hi bande_ramesh91,
Your procedure has a couple of syntax issues. Please fix that.
1. The VAR1 assignment should end with a semicolon(;) and that's why you are getting syntax error - (line no 11)
2. After fixing the above you would get an error at OUT_TABLE - (line no19).
The query should look like below:
SELECT SUM(SALES_AMOUNT) AS SALES_AMOUNT, SUM(SALES_AMOUNT-(SALES_AMOUNT*:DISCOUNT/100)) AS NET_AMOUNT....Thanks