SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 calucate commision and total salary
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sqlstar21
Starting Member

India
1 Posts

Posted - 02/02/2013 :  02:38:10  Show Profile  Reply with Quote
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

India
52309 Posts

Posted - 02/02/2013 :  03:08:09  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000