Sunday, September 30, 2007

Umbilical Brothers Samurai

Umbilical Brothers Samurai - Sideshow

Umbilical brothers parts

Umbilical Brothers - Taxi

The Pickup Artist - Season 1 - Episode 6

The Pickup Artist - Season 1 - Episode 6

BF2 funny

Battlefield 2 - The Pwn3d Life

funny cat

Funny Cats Compilation Video [funny]

Little bit funny piece of post!

Hi Guys,

Today I came across one little bit funny piece of post at one of the thread in Oracle Forum.

Member No 1 asked following doubts:

Hi all,
I have the table

List
flag_circ char(1)
impo number(11,3)

and I have to update flag_circ, if the number of decimal of the field impo, are 0 or 1

For example
Impo value
123,444 –> no update
123,44 –> no update
123,4 –> yes update
123 –> yes update

I’m trying those functions like round, mod, trunc, but don’t work!

Some suggestions?

Member No 2 answers:

Use this
declare
cursor c_1 is select rowid row_id from table where (round(number_field,0) = number
or round (number_field,1)= number;
begin
for f_1 in c_1 loop
update table(repplcae by table name here) set flag = ‘Y’ where rowid = f_1.row_id;
end;
/
I think this will work

Member No 3 answers to Member No 2:

It may work but it is horrible.

What would motivate you to declare a cursor and do in a loop what can easily be done with a single update statement?

A desire to write the slowest least efficient code possible?

If you have written code like this at work please do yourself and your employer a favor and get rid of the cursor loop.

There is from 9i onward almost no excuse for ever writing a cursor loop.

Now lets think about it, its not really funny but do tell us what not to do!

Any way my answer was

Hi,

Try this

UPDATE list
SET flag_circ = somthing you want
WHERE INSTR(impo,’.',1,1) = 0
OR
LENGTH(SUBSTR(impo,INSTR(impo,’.',1,1)+1,2)) = 1

My tests:
SQL> WITH data_Set AS
2 (
3 SELECT 1 row_no, 1221.4554 text_col FROM dual
4 UNION ALL
5 SELECT 2 row_no, 1221.4554 text_col FROM dual
6 UNION ALL
7 SELECT 3 row_no, 1234 text_col FROM dual
8 UNION ALL
9 SELECT 4 row_no, 2343.5 text_col FROM dual
10 )
11 SELECT row_no FROM data_set
12 WHERE INSTR(text_col,’.',1,1) = 0
13 OR
14 LENGTH(SUBSTR(text_col,INSTR(text_col,’.',1,1)+1,2)) = 1
15 /

ROW_NO

Funny/Weird Wedding Stories

I'm sure you all have a heard or experience something funny or weird during a wedding. Perhaps we can share those stories here, just for a laugh or to serve as a precaution. I have quite a few. To start with...

A few years back, a friend of my brother got married in Ipoh. The bridal car is a luxury car owned by the bride's ex. After being decorated, the ex drove the bridal car to the groom's house. At night, during the bachelor party the ex said he has something to do and took the bridal car out. He did not return.

The next morning, everyone was anxious as there was no bridal car. Everyone tried to search for the driver but he went MIA. It was running late. So, no choice, the groom had to use his own car as bridal car. No ribbons or decorations what so ever.

Thus, they started out to the bride's house. The 'heng tai' didn't know each other that well as they are friends from different stages of the groom's life. Most of them do not know the roads in Ipoh that well. So they just follow one another. After a few turnings and quite a long journey, finally they made it to the bride's house. The heng tai took all the gifts including the roast pig and put on the table in the bride's house prepared for such purpose. Then they sat waiting as the groom and some other heng tai has not arrived. After a while, only then they realised that they have gone to the wrong house!! They couldn't get the gifts back as this family say it is bad luck to have the gifts taken away. These heng tai got to wait at the wrong house till someone 'rescued' them.

By this time, it was running very late and the bride's family were very anxious. The bride herself was almost in tears. This happened a few years back where handphones were not as common as it is now. So, there's no way to contact the groom or the heng tai. Finally, the groom arrived and to everyone's horror, he came in a black iswara! Everyone was very angry as this is considered bad luck and back omen. Somemore the car was not decorated at all. And also, there was no gifts and no roast pig.

The groom tried to explain about the original bridal car but the bride got very angry as the car and the driver is her ex and she thought the groom tried to talk bad about her friend. They quarrelled in front of everyone and finally the wedding was cancelled.

After this incident, my brother always say,'never trust a partner's ex'