Home > database >  If judge to review with the update
If judge to review with the update

Time:10-13

Written in oracle stored procedure, the period of execution error, everybody help me answer the bai, be obliged!
The update salary201911 set tax=
(
The case when the tax amount & lt;=36000, then the tax amount * 3% annual income tax when 36000 & lt; The tax amount & lt; * 10%=144000, then the tax amount - 2520 - year tax cumulative
When 144000 & lt; The tax amount & lt; * 20%=300000, then the tax amount - 16920 - year tax cumulative
When 300000 & lt; The tax amount & lt; * 25%=420000, then the tax amount - 31920 - year tax cumulative
When 420000 & lt; The tax amount & lt; * 30%=660000, then the tax amount - 52920 - year tax cumulative
When 660000 & lt; The tax amount & lt; * 35%=960000, then the tax amount - 85920 - year tax cumulative
Else the tax amount * - 181920-45% annual tax cumulative
End
);

CodePudding user response:

What's wrong, grammar seems to do not have what problem

CodePudding user response:

-
the condition ofWhen 36000 & lt; The tax amount & lt;=144000

- changed to

When the tax amount & gt; 36000 and tax amount & lt;=144000

CodePudding user response:

Upstairs positive solution, pseudo code cannot be used directly in the SQL, still have to follow the SQL syntax,

CodePudding user response:

After the 2nd floor, ok??
  • Related