Tuesday 31 July 2007

SQL Server weirdness: Alter column datatype from ntext to nvarchar

Came across this SQL Server weirdness at work...if anyone is designing a database with column datatype of 'ntext'....then think twice! : O

You see i was writing up a SQL Server DB upgrade script and I wanted to alter a table column of datatype 'ntext' to 'nvarchar'. After I have written the SQL statement, executing it resulted in an error:
Cannot alter column 'xxx' because it is 'ntext'
Thankfully my beloved friend Google was able to help me out on this! Apparently this works in Enterprise Manager (hmm I wonder if it works for SQL Server 2005...but I would believe so) because EM does some magic to ensure it gets its job done for their user:
"You will see that it (EM) is actually copying the old table, creating a
new one, copying the data from old to new and dropping the old. That is
why it works in EM and not in the query tool!"
Right...so EM creates a new table, copy the data and then drop the old table, so that's why EM has no problem with it. But you see I am writing a script, so I am forced to 'write the query' myself! So all I need to do is to write a few more statements to manually emulate the EM behaviour in my script. (Not a hard task when table is small...but could become hideous if table is a big one)

I only have one complain about all this....ahha why can't SQL Server display more 'informative' error message! -.-" Thank goodness my friend Google is around! hehe : P

References (thanks to the following pages):
http://forums.devx.com/archive/index.php/t-48982.html
http://www.dbforums.com/archive/index.php/t-318199.html

Wednesday 25 July 2007

Music is the Essence of (My) Life...(& 歌曲分享: 我們的歌)

I could still remember last Tuesday night, after attending my last Toastmaster meeting.....
(yes....I can't believe I have finally taken the bold step, be brave enough, to say I'm quitting Toastmaster!!!! And so that I can pursuit my other goals as well!!! : P)

So after the meeting has finished, I headed out to get my car. I got into my car and hooked up my "Little Black" (nano) to the car kit before I pulled the handbrake to make my way back home. While I was driving I was having this feeling.....hmm....you know the feeling when you have finally accomplished something and you come to the end of the that road? Kind of like the feeling we have when we graduate!? Happy & proud but sad at the same time! That was the exact feeling I had for the night while driving! hehe

Funny enough the music was shuffled to just the right mood for me! haha so I was singing my heart out while driving back home!!! : O And it was a wonderful feeling!!! Each song that played, I sang to it with my full heart! And when I got back home...I suddenly realised something:

What makes music so great? Why do people love music, love singing so much?
不是因為...音樂能夠唱出我們的心情,
而是因為...音樂能讓我們埋置我們的感覺在裡面。

It is not because that music sings out our feelings,
but it is because music allows us to pour our feelings and express our feelings in the song!!!

hehe think I sound a bit too 'philosophical' here.... hehehe but see the subtle difference I am trying to explain here!? : O

hehe but I believe this is why people love music, people love singing so much. Or rather...me...why I love listening to music and singing to songs so much! And after singing a good song that fits into my mood, it makes me feel awesome!

To end my note here, let me leave a piece of partial lyrics to a recent song I listened to:
王力宏 - 我們的歌
(作詞:王力宏 作曲:王力宏)
己經聽了一百遍 怎麼聽都不會倦
白天唱到黑夜 你一直在身邊

如果世界太危險 只有音樂最安全
帶著我進夢裡面歌詞都實現

無論是開心還是難過我的愛一直不變
不必擔心時間流逝帶走一切
無論是Hip-Hop 還是搖滾我的愛一直不變
所有美好回憶紀錄在裡面
For song & lyrics: 我們的歌

hehe I agree with what Lee Hom is saying here in the song ga! "Music is definitely the essence of (my) life" : P

Wednesday 18 July 2007

A Night of Quotes...

I'm not too sure why....perhaps....too much emotions just filled me tonight....
Hence I happened to come up with the following colloquial quotes during a chat tonight:
  • "When is enough...ENOUGH"
  • "Nothing is ever ENOUGH" (courtesy to my dear friend liemon)
  • "Only those who are selfish will not understand what enough means" (or those who are dumb? or those who chose not to care ?) (and courtesy to liemon again!)
  • "Never say it is...until it is"
Something for us all to think about.....! : O

Monday 16 July 2007

歌曲分享: What Goes Around...Comes Around

Prelude:
Have been listening to JT's (Justin Timberlake) album for quite a while now....and it is definitely a very good album to 'boil' on (Cantonese saying)!!! (And it surely does help to keep me awake during those long after lunch hours at work.....or during the dazzy cold cold Winter morning! ><") I definitely 'highly recommend' this album, Justin Timberlake - Future Sex / Love Sounds album (for those who still haven't listen to it yet)! If you like something upbeat, something different from previous 'fast' songs....give this one a try!!! I definitely enjoy the concept of the album...as you listen through the songs....running a theme and continuing a story as each track goes by..... JT has definitely showed his creativity and maturity in this album I think.

As to the songs in the album..originally I loved the song "My Love". As I continue "boiling' via the album....the more I listen to it......I found myself loving the songs "Sexy Back", "Love Stone" and in particular "What Goes Around...Comes Around".

(Image from Amazon.co.uk)

What Goes Around...Comes Around:
Love the sound effects of the song...right from the beginning you hear the catchy..."Indian benjo" sound (sorry for my incorrect description...may be you can think of a better word?)...and I guess the 'lyrics' just really got into me....(of course, as well as the up beat tempo and rhythem of the song)!

I love the following part of the song....heehe have been singing it in the car....(funny enough some of the words just 'fit in perfectly' to my mood for the last couple of months). The lyrics + the beat + the way JT is singing it...expresses the emotion perfectly:
Don't want to think about it
Don't want to talk about it
I'm just so sick about it
Can't believe it's ending this way
Just so confused about it
Feeling the blues about it
I just can't do without ya
Can you tell me is this fair?
Oh and of course...I love the title of the song too! A good little moral that we should all keep in the back of our minds!

Video:
Must watch!!! (Mtv are way better than Chinese mtv ><" sadly) What Goes Around...Comes Around (from youtube)

Lyrics:
What Goes Around...Comes Around (lyrics)

Wednesday 11 July 2007

Software Project "Postmortems"

Prelude:
Yip...have been off the blogging world for a bit longer than usual as I've been quite busy trying to catch up and finish off various businesses in 'me' life!

During my 'off blogging' period...of coz I'm still relatively active on the web....and I have so many so many so many blog posts that have accumulated for the past couple of months or so....so, let me see if I can slowly catch up! : P

Meanwhile let me move on to "Postmortems"!!!

What is "Postmortems"?
Typing in "define: postmortem" on Google gives me the following:
  • Occurring after death.
    www.dabney.com/wacomuseum/library/medterms.html
  • After death. Often used to describe an autopsy.
    www.stjude.org/glossary
  • Complete exam of chicken after death
    www.geocities.com/KelliAnn293/definitions.htm
  • Came across this article today at work:
    Gave Development Postmortem
    which talks about what can and should be discussed after a software project has come to an end.

    Obviously this rarely happens in reality, but I reckon and agree it is very important to have 'some sort of postmortem' no matter how short it takes. By having communication and discussions, everyone and those participated can all 'learn' from the experience....so that the next project will be better to manage, better to develop and more efficiently completed!

    My conclusion:
    If I am a manager or a project leader one day.....I'll definitely look into this!!! : P

    *P.S. - Inside the article there, there is a link to another article "The Value of Project Postmortem"