Rabu, 25 Januari 2012
Update subquery
update trmasterincentive set average_incentivenp=incentivenp
from trmasterincentive a
inner join (
select a.idstructure, incentive, cast(incentive*score as int) incentiveNP
from (
select idstructure, percentage, sum(incentive) incentive from _incentiveNPPercentage
group by idstructure, percentage
)a inner join trmasterincentive b on (a.idstructure=b.idstructure)
inner join mscore c on (status=10 and a.percentage between fromrange and torange)
) b on (a.idstructure=b.idstructure)
from trmasterincentive a
inner join (
select a.idstructure, incentive, cast(incentive*score as int) incentiveNP
from (
select idstructure, percentage, sum(incentive) incentive from _incentiveNPPercentage
group by idstructure, percentage
)a inner join trmasterincentive b on (a.idstructure=b.idstructure)
inner join mscore c on (status=10 and a.percentage between fromrange and torange)
) b on (a.idstructure=b.idstructure)
Langganan:
Posting Komentar (Atom)
Blog Archive
About Me
- Koral Web
- Kami adalah web developer. Beberapa produk yang pernah kami buat antara lain website, aplikasi klinik, aplikasi apotik, aplikasi EDMS (Electronic Database Management System), Energy Consumption Management System, RKBI (Rencana Kunjungan Barang Import) dan lain-lain sesuai dengan request dari client kami. Jika Anda tertarik untuk membuat system atau aplikasi, jangan sungkan-sungkan menghubungi kami.
Bahasa Pemrogramanmu?
Nasihat
Barangsiapa capek lelah dan letihnya bukan karena Allah maka celakalah dia
Diberdayakan oleh Blogger.
Web Sunnah
Blog Archieve
- Info (3)
- Kajian (3)
- My Program (1)
- Orang Terkenal (1)
- scrip (2)
- SQL (23)
- Subquery (9)
- Trik (13)
0 comments:
Posting Komentar