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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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