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.

Monday, July 16, 2012

K5 versus Camry - word of cybermaster98

Copied from lowyat forumn write by cybermaster98. How good he's on writing and facts.

__________________

First of all, your parents are not old. Old would be in the 60 above bracket. U have to consider their lifestyle first. Are they gonna do alot of outstation driving or is it limited to just short dashes in the city? That would be your main consideration in getting a D segment. But if finance is not a problem for u, then by all means go ahead for a D segment. If not, then maybe best to go for something smaller. 

For now, uve brought your choices down to between the Camry and the Optima K5. And when u say 'price almost the same' i assume ure comparing the K5 with the 2.0 Camry (not sure if its E or G spec). 

Yes Kia has got many gadgets (most of it your parents wont use). But i note that ppl tend to focus more on gadgets which are merely add on's in my opinion. Before i bought the Optima, i checked out many D segment cars for many months. The following criteria helped in my decision making: 

1) Value for money - you get much more for the same price
2) Very good specs (not just add on's)
3) Cheaper price among the other D segments
4) Safety - marginally stronger body, more safety features
5) Great design
6) Spacious interior
7) Good fuel consumption
8) Best in class warranty terms (5 yrs unlimited mileage manufacturer's warranty) 

Safety features are not there to just compensate for your own mistakes. We may be great drivers but what happens when someone else makes a mistake (which is very common in Malaysia)? Therefore, the typical Malaysian mindset of 'no need extra airbags, no need VSC, no need ABS, etc' must change as even Paultan mentioned. We take our safety for granted too often. 

I owned a Toyota Vios for 9 years before i changed to the Optima. And i had a great experience with excellent after sales service. But later i realised that, i was getting ripped off by Toyota driving an 'empty' car but paying through my nose. No doubt i enjoyed 9 trouble free years but i was told that the later models had alot of problems. Over the 9 years, i got to know many of of the people at Toyota and thus was able to get inside information. Now u have the Camry coming out of Malaysia. Would the quality be as good as previous models? We'll have to wait and see i guess. 

Yes the Camry offers comfort which suits many people. Toyota's after sales service is good as well. But keep in mind that Kia is fast improving. Let me share an example. I found my Optima's rear suspension a bit soft when going over bumps at high speeds. I brought it up with Kia SC. They checked and found nothing wrong. But Kia Glenmarie (HQ) instructed them to just change the both rear shock absorbers FOC. I also complained about my driver's power window being a bit rough. And they changed the power window motor FOC. I would never have got this kind of service in Toyota. Toyota would have fought tooth & nail to defend themselves before making any change under warranty. But in saying this, Kia still has some way to go before they can truly say they are on par with the Japs. But i strongly believe they are on the right track. Their cars are now better and more technologically superior to many others. Their after sales are improving. Change takes time so dont expect anything overnight. 

Their sales are improving by leaps and bounds. Just look at the Forte in Malaysia. Its now a common sight already. Resale values are also much improved. When there is demand, resale values will increase. But remember that resale values for D segment cars cannot be compared to B & C segment cars. You will not get those kind of values. And right now, many of those going for the Camry are opting for the 2.5V with its new engine and gearbox. So ull find that in about 5 yrs time, the resale value (%) will be better for the 2.5V compared to the 2.0L. 

But since its for your parents, why bother about resale values anyway? Yes Toyota has made a name for itself building vehicles that are durable. But are the new models as durable? I have my reservations. But thats where warranty comes in. Kia has got among the best warranty terms in the market currently. 5 years unlimited mileage manufacturer's warranty. The 2nd best is VW and Peugeot with 3+2 years unlimited mileage. Even BMW only offers 4 years unlimited mileage. So if you have such good warranty terms from Kia, why not give the Optima a chance? 

But i think most importantly, is for your parents to drive both cars and have a feel. You can tell them the pro's and con's of each but ultimately they have to enjoy driving a particular make. But do educate them on the various aspects of the car. 

Personally, i am quite angry with Toyota for ripping off its customers here in Asia. The Camry was a real disappointment. Imagine still offering a 10 yr old gearbox and engine with a so called 'new generation' flagship car? If they can afford to fit out the American Camry with 10 airbags and VSC, why give us just 2 and remove the VSC as well? And still increase the price! Would they dare to do this in America? Surely not! That would have resulted in a nationwide boycott of the Camry. So why give them the chance to do it here? I truly believe that when the buying stops, only then will Toyota realise that they cant take Malaysians for granted anymore.

Just my 2 cents