tawongunung
04-17-2006, 06:22 AM
Anyone can help me?
My data like this....
absen table data
id date
1 2006-04-01
2 2006-04-02
3 2006-04-03
1 2006-04-01
2 2006-04-02
1 2006-04-01
2 2006-04-02
3 2006-04-03
pegawai table data
id name
1 John
2 Miranda
3 Michael
I want to show pegawai.id where pegawai.id not in table absen on 2006-04-03 by sql code...
i'm use this code, but not work
SELECT
pegawai.id
FROM
pegawai,
absen
WHERE
pegawai.id <> absen.id AND
absen.date = '2006-04-02'
it show like this
id
1
2
2
3
i want it show like this
id
2
My data like this....
absen table data
id date
1 2006-04-01
2 2006-04-02
3 2006-04-03
1 2006-04-01
2 2006-04-02
1 2006-04-01
2 2006-04-02
3 2006-04-03
pegawai table data
id name
1 John
2 Miranda
3 Michael
I want to show pegawai.id where pegawai.id not in table absen on 2006-04-03 by sql code...
i'm use this code, but not work
SELECT
pegawai.id
FROM
pegawai,
absen
WHERE
pegawai.id <> absen.id AND
absen.date = '2006-04-02'
it show like this
id
1
2
2
3
i want it show like this
id
2