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
 SQL Server 2008 Forums
 Other SQL Server 2008 Topics
 Need help with SQL query calculation?

Author  Topic 

tuansaker3291
Starting Member

1 Post

Posted - 2013-04-23 : 09:27:44
Databases have this form, sir:
[url=http://s367.photobucket.com/user/tuansaker3291/media/Capture-2_zps6ab4100b.jpg.html][/url]

1 I have a database like this, the employee's pay is calculated as follows
(luongcoban port number *) * + khenthuong heso - kyluat - tamung
The problem is that the code queries the employees, month and year, let's assume it is manhanvien @ variable, @ @ stairs and turn men away
The next problem is with tiencong table, chamcong, tamung the day, month, and employee code only appears one time simultaneously, but separately, the reward and discipline to be able to reward disciplined several times in 1 month should be to get the total amount of reward and discipline by month and year to be able to enter into payroll formula on the other.

So do not know, this recipe is mixing what type of SQL statement: D
Payrolls it this

[url=http://s367.photobucket.com/user/tuansaker3291/media/Capture-2_zps2969a4d1.jpg.html][/url]

Here is a database, in both form and sql mdf file for you to test facilities addtack or create queries, thanks very much pro sir ...
[url]https://docs.google.com/file/d/0B3PQlpIptb1HU0R0c2RfMVhMR2c/edit?usp=sharing[/url]

sorry for my english is not good!

sdfsdf
   

- Advertisement -