mercredi 9 décembre 2015

Select all table in 2 table with null value

I Have 2 Table in SQL SERVER 2005:

first table :

Tanggal
2015/01/01
2015/01/02
2015/01/03
2015/01/04
2015/01/05
2015/01/06

Second Table :

Tanggal               Jam_Masuk          Jam_Pulang.    Id_user
2015/01/01        08:00:00                17:00:00         00600320 
2015/01/03        08:00:00                17:00:00         00600320 
2015/01/05        08:00:00                17:00:00         00600320 
2015/01/06        08:00:00                17:00:00         00600320 

I want select like this :

Tanggal               Jam_Masuk          Jam_Pulang           Total              Status      Id_user
2015/01/01        08:00:00                17:00:00               09:00:00        OK          00600320   
2015/01/02        --:--:--                --:--:--               --:--:--        ALPHA/IZIN  00600320 
2015/01/03        08:00:00                17:00:00               09:00:00        OK          00600320   
2015/01/04        --:--:--                --:-- :--              --:--:--        ALPHA/IZIN  00600320 
2015/01/05        08:00:00                17:00:00               09:00:00        OK          00600320   
2015/01/06        08:00:00                17:00:00               09:00:00        OK          00600320          

Note : Field Total (hh:mm:ss)= Jam_Pulang - Jam_Masuk

Thanks Before

Aucun commentaire:

Enregistrer un commentaire