Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 calucate commision and total salary

Author  Topic 

sqlstar21
Starting Member

1 Post

Posted - 2013-02-02 : 02:38:10
below are 2 tables-> shail_customer and shail_employee

SQL> desc shail_customer;
Name Null? Type
----------------------- -------- -------------
CID NUMBER(5)
CNAME VARCHAR2(20)
CAMOUNT NUMBER(20)



select * from shail_customer;

CID CNAME CAMOUNT
------ -------------------- ----------
1 shailesh 30000
2 amit 400000
3 utkarsh 35000
4 satyajit 45000
5 amol 44000



SQL> desc shail_employee;
Name Null? Type
----------------------- -------- ----------------
EID NUMBER(10)
ENAME VARCHAR2(20)
BASIC_SALARY NUMBER(20)
COMMISION NUMBER(20)
INSENTIVES NUMBER(20)
TOTAL_SAL NUMBER(20)


primary key eid& cid
*Commision is calculated as camount*.30
*Total_sal is calculated as basic_salary+commision+insentives

plz suggest a procedure to calculate commision and total salary

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-02-02 : 03:08:09
doesnt look like t-sql to me. what is the rdbms you're using? this is ms sql server forum so if you're using anything else make sure you post it in relevant forums at www.dbforums.com

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -