Friday, August 10, 2012

SQL Server - get today's record from datetime field


Select p.Pump_Name, sum(hd.delivery_volume) as volume, sum(hd.delivery_value) as value
from hose_delivery hd , hoses h , pumps p
where hd.hose_id = h.hose_id and h.pump_id = p.pump_id and
CONVERT(VARCHAR(10),hd.Cleared_Date_Time,103) = CONVERT(VARCHAR(10),GETDATE(),103)
group by p.Pump_Name order by p.Pump_Name

New Version of Speed trap camera on Malaysia Highway

Senarai tempat pemasangan kamera perangkap had laju

PDRM sudah memasang sistem baru untuk
mengesan kelajuan kenderaan yang
melebihi had laju pada suatu tempat.. kalo
dulu tembak bawah jambatan, skrg sudah
tukar maa
 tetapi sebagai rakyat Malaysia
yang bertanggungjawab, kita mestilah
memandu dengan berhati-hati

Berikut diberikan lokasi-lokasi pemasangan
sistem baru perangkap hadlaju yang telah
dipasang oleh pihak PDRM:


PLUS Arah Utara
¦Under a bridge at about 456km, Sg Buloh junction.¦Under a bridge at about 459km, Bukit Lanjan interchange.¦Under the overhead restaurant at Sg Buloh.¦Under the last bridge before Sg Besi toll at 309.2km.¦Under the bridge at 296.5km, Bangi junction.¦Under the newly constructed bridge at 289.0km, after Nilai North junction.¦Under the bridge at 286.5km, Nilai North junction.

PLUS Arah Selatan
¦Below signboard at about 454.6km and 455.2km, Sg Buloh layby.¦Under the bridge after Subang junction at 11.3km.¦Under the bridge at 22km, Bukit Lanjan junction.¦Under the bridge before Mint hotel, Sg Besi Toll. 80km/h only!¦Under the bridge at 302.8km, Kajang junction.¦About 1km south of Bangi junction, both south and north bound outer lanes¦At 296.5km and 297km, Bangi junction. 
¦Under the newly constructed bridge at 289.0km, before Nilai North junction.¦At 285.5km and 285.8km, Nilai North junction.¦On center divider at 251.8km and 253km after Senawang junction.¦After Alor Gajah junction at 213.9km, next to water theme park.¦Behind the right hand crash barrier at 198.4km.

Lebuhraya Elite Hubungan Timur Tengah/ Utara
¦On left hand side at 4.8km after Batu Tiga/ Shah Alam exit¦Under the overhead restaurant at USJ/Hicom junction about 8.5km. 90km/h zone!¦Below the bridge before USJ/Hicom junction at 10.5km.

Lebuhraya Elite Hubungan Barat Tengah/Selatan
¦Under the overhead restaurant at USJ/ Hicom junction about 8.5km. 90km/h zone!¦Below the bridge before USJ/Hicom junction at 10.5km.¦After exit from KLIA toll to the airport,below Jalan Pekeliling flyover.90km/h NKVE Arah Timur/Utara¦300m before Jalan Duta toll, 60km/h!¦Behind crash barrier on the left when going towards Jalan Duta toll, at 24.9km,80km/h!¦Below bridge at Damansara Junction, 17.5km

NKVE Arah Barat/Selatan
¦Behind crash barrier on the left when leaving Jalan Duta toll from KL, at 25.3km and 25.7km, 80km/h!¦From Jln Duta, below the bridge, 23km, 80km/h zone!¦From Jln Duta, at the underpass at Sg Buloh Y-junction, 22km.¦Behind crash barrier at Damansara Junction, 17.7km and 16.8km¦Below railway bridge at 11.2km¦Under the bridge at Shah Alam junction.

Lebuhraya Kesas Timur
¦Under the bridge at 44.8km, downhill run after Puchong junction.¦Kesas West Bound¦At Sg Besi side of East Bound Toll. Kuala LumpurCity¦Jalan Duta; below the flyover at the Damansara junction, 70km/h zone.

Lebuhraya Kesa 
 Klang¦Dual carriageway between Klang and Port Klang. Towards Klang direction, at about 13km mile stone. 70km/h only!

Leburaya Pantai Timur
¦East bound, downhill run after Raub junction.¦Maran, 60km/h zone.¦Paya Bungor, 70km/h zone.

Kawasan Negeri Johor Arah Selatan
¦Tangkak junction.¦Under the bridge after Yong Peng¦North junction at 97.3km.¦Ayer Hitam junction.¦Sedenak junction.

Jalanraya Sekitar Utara Malaysia 
 Arah Utara¦Around Ayer Hitam in 60km/h zone.¦Before Perwaja Steel.¦Sg Petani junction.¦Between Seberang Jaya junction and Sg Dua Toll.¦Penang Bridge at island end.Speed limit 80km/h.

Jalanraya Sekitar Utara Malaysia 
 Arah Selatan¦Penang Bridge Island end. Speed limit 80km/h.¦About 2km before Juru Toll Speed limit 90km/h.

Kawasan Perak Jalanraya Arah Utara
¦Under the bridge at 197.1km and 198.8km, afterKamunting Junction.¦Under the bridge at 204.3km, after KamuntingJunction.¦Under the bridge at 208km, before Kamunting Junction.¦Under the bridge at 214.8km, before Kamuntingjunction.¦Ipoh Vista Point at about 263km. Speed limit 80km/h.¦Under the bridge at 271km, Ipoh North Junction.¦Under the bridge at 274.4km, Ipoh South Junction.¦Under the bridge at 286.9km, Simpang Pulai Junction.¦Under the bridge at 296km, Gopeng Junction.¦Under the bridge at 352.6km, after Sungkai Junction. ¦Under the bridge at 353km, Sungkai Junction.¦Under the bridge at 373km, Slim River Junction.

Kawasan Perak Arah Selatan
¦Under the bridge at 199km, before Kamunting junction.¦Under the bridge at 241.9km, at Kalau Kangsarjunction.¦Under the sign post at 296.1km, before GopengJunction.¦Under the bridge at 297km, at Gopeng Junction.¦Under the bridge at 300km, after Gopeng junction.¦Under the bridge at 308.6km, after Gopeng junction.¦Under the bridge at 372.6km, at SlimRiverjunction.

SQL Query to return 24 hour


SELECT CONVERT(VARCHAR(10),hd.Cleared_Date_Time,101) as dDate, CONVERT(VARCHAR(2),hd.Cleared_Date_Time,108) as TDate,
COUNT(hd.delivery_id) AS TotalHourlyTransactions
FROM hose_delivery hd , hoses h , grades g WITH (NOLOCK)
WHERE hd.hose_id = h.hose_id and h.grade_id = g.grade_id AND
hd.Cleared_Date_Time BETWEEN CAST('08-08-2012' AS SMALLDATETIME) AND CAST('09-08-2012' AS SMALLDATETIME)
GROUP BY CONVERT(VARCHAR(10),hd.Cleared_Date_Time,101), CONVERT(VARCHAR(2),hd.Cleared_Date_Time,108)
ORDER BY TDate ASC

Sunday, August 5, 2012

Budak2 ni dah dpt Pengasuh baru.

Slps Yana nk kahwin Dan da x keje. Lps tu Sana indon yg pandai kelentong dah balik. Kemudian mak Mon pulk yg jaga, akhirye dpt jugk la Pengasuh utk budak2 ni.

<p>Kak ema nama dia. Budak2 ni panggil mak ema. Setelah sminggu hntr kt sana nmpkye ok lah. Alhmdllh. Mmg kt situ je lah, da x carik lain da smpi la pindh kt bangi nnti. </p>

Kn byr Rm480 sbln slps discount drpd hage asal Rm500. Lps tmbh lg Rm50 utk beli makann budak2 ni. Klu x kn bawak barang2 basah so fikir2 baik bg duit aje.

Hehe start hntr weekend lps. So Diorg nangis lah. Tp kejap je dlm 3 jam je then ambil. Hari Isnin budak2 ni kira Oklah x nangis dah tp muka Faiz sedih Sgt. Tp hari selasa dia da ok. Siap ckp suka sangat, suka sangat bila nk g sana :)

REDBAT for my putra for extra security

Putra aku ni da kena ompel kunci bonet belakang. X sangka pulk kereta lama camtu pun ada org nk curi.

Fikir2 decide beli lock ni lah. Hopefully mmg selamat la Dan senang nk lock. Kunci style klu Ssapa nk bukak mmg susah lah Dan makan masa lama.

Ok ni gmbr dia slps pasang. Dia ada 2 kunci Dan kereta x bole start klu kunci x bukak lg.

Hage dia siap pasang Rm290 beli kt kedai tinted d cheras. Pasang pd hari selasa lps.

Tq


New set tyre for my forte

Yesterday my forte got new set all tyre and the Total cost ngam2 tu 1k as follow
Newton N8000 215-45-17 : Rm240 x 4 = 960.00
Alignment : 20
Nozzle masuk angin : 4 x rm5 = 20

Decided to use the Newton tyre n8000 because of good review received from internet and from blog's friend.

The normal price of the tyre is rm280 but I ask them I got Rm240 price from blog and at last they give me the price.

Below is the receipt picture shooted later.