Calculate income tax by accepting empno

Assignment Help Computer Engineering
Reference no: EM132786026

Title - Income Tax Calculation using PL/SQL Function

Aim- To Calculate Income tax by accepting empno as a input. We assumed if Annual income is exceeded 500000 then employee incurred tax. Tax will be incurred on amount 10% of ( annual income-250000).

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 2 15:30:08 2021

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL> connect
Enter user-name: system
Enter password:
Connected.
Employee Table
SQL> select * from emp;

     EMPNO ENAME               SAL     DEPTNO JOB             HIREDATE

---------- ------------ ---------- ---------- --------------- ---------

      1000 Sachin            36250         10 Salesman        12-JAN-00

      1001 Virat             76250         20 Forman          03-FEB-01

      1003 Ajit              70000         20 Welder          09-AUG-98

      1004 Rohit             73750         20 DBA             09-MAY-98

      1005 Mahendra          67500         30 Manager         23-JUN-01

      1006 Sai               68750         20 Manager         03-JUL-01

      1007 kartik            70000         20 Manager         04-JUL-01

      1008 Azhar             86250         20 Manager         04-JUL-01

      1009 Mohhamad         123750         20 Manager         01-JUL-90

      1010 Swati Patil      122500         10 Manager         01-JAN-88

      1011 Azhar            150000         10 Salesman        01-JAN-99

 

     EMPNO ENAME               SAL     DEPTNO JOB             HIREDATE

---------- ------------ ---------- ---------- --------------- ---------

      1012 Aniket            90000         90 Manager         09-APR-01

      1002 Anita             78000         89 Teacher         01-JUN-00

      2001 Sakshi            90000         90 Teacher         01-JAN-05

14 rows selected.

SQL> set serveroutput on;

SQL> create or replace function itCal(en number)
2 return number
3 is
4 annual_sal number;
5 it number;
6 begin
7 select sal*12 into annual_sal from emp
8 where empno=en;
9 if(annual_sal>500000)
10 then
11 it:=(annual_sal-250000)*0.10;
12 else
13 it:=0;
14 end if;
15 return it;
16 end;
17 /

Function created.

Testing Output Yield by Calling Function Itcal
SQL> selectitcal(1011) from dual;

ITCAL(1011)
-----------
155000

SQL> selectitcal(1003) from dual;

ITCAL(1003)
-----------
59000

SQL> selectitcal(1005) from dual;

ITCAL(1005)
-----------
56000

SQL> select itcal(1000) from dual;

ITCAL(1000)
-----------
0

SQL>

Attachment:- Income Tax Calculation using PL.rar

Reference no: EM132786026

Questions Cloud

How would you handle the dilemmas in planning your research : Describe two dilemmas that counselor might face in attempting to plan research with special populations (e.g., seriously mentally ill, children).
Discuss the role of the public health department : Discuss the role of the public health department. There is conflicting views on whether a pubic health department should provide direct care.
Legal and ethical scenarios : Research the court system of YOUR state. Present a brief overview of the court system by identifying the courts and the types of cases they preside over.
Explain the physical consequence of the clinical issue : Develop a PowerPoint presentation of 15-18 slides, addressing clinical issues in the elderly and neglect and abuse of dependent adults and the elderly.
Calculate income tax by accepting empno : Calculate Income tax by accepting empno as a input. We assumed if Annual income is exceeded 500000 then employee incurred tax. Tax will be incurred on amount
Are any insights about the spirituality of group : Are there any insights about the spirituality of this group that you felt were missing from the text's consideration and that you would like to add for class
What is the effect of a percent increase : We are working on elasticity of demand. Consider a good whose price elasticity of demand equals -0.5.
Determine amount of over-or under applied factory overhead : Factory overhead is applied at the rate of $2.30 per direct labor hour. Determine amount of over-or under applied factory overhead
Calculate sue opportunity cost of producing a cap : In an hour, Sue can produce 40 caps or 4 jackets and Tessa can produce 80 caps or 4 jackets.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a program to test the function and print the content

Write a C++ program to test the function and print out the content of each element in the new array in main.

  Explain the synthesis of guar gum

Explain the synthesis of guar gum - Explain the life cycle and environmental impact of guar gum

  Describe a way to keep track of the pairs of meeting players

Suppose you are designing a multi-player game that has n = 1000 players. Describe a way to keep track of the pairs of meeting players and who is the winner.

  Write a program that continuously prompts the user

Write a program that continuously prompts the user to enter an integer, or any character to quit.

  Write a program that reads student scores

Write a program that reads student scores, gets the best score (BestScore), and then assigns letter grades.

  Show how the minimal number of nops can be inserted

Show how the minimal number of NOPS can be inserted between the instructions to eliminate the hazards Assume that your CPU can forward.

  Convert the number of cents into dollars and cents

Write a program that prompts users (in main) for the amount of pennies they have.

  Write a function named roots that solves quadratic equations

Write a function named 'roots' that solves quadratic equations using the quadratic formula: It should take as arguments three numbers a, b, and c.

  Explaining the best practices of firewall management

Explaining the best practices of firewall management they are Access Control Lists, Firewall Rules ( blocking of suspicious subnets), and failover.

  How many linear feet of shelf space are required

A standard computer CD holds approximately 700 million characters. Estimate how many linear feet of shelf space are required to store 700 million characters encoded as text (i.e., printed, bound books) rather than as electronic media.

  Define an array data type called quiz-array

Define an array data type called Quiz_Array that will contain 12 components indexed by the integers 21 through 32. The component type is Boolean.

  Examines how culture works within the organization

Organizational behavior is really the combination of four areas of study - psychology, social psychology, sociology, and anthropology.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd