Thursday 26 August 2010

Father and Son - Cat Stevens

It's not time to make a change
Just relax, take it easy
You're still young, that's your fault
There's so much you have to know

Find a girl, settle down
If you want, you can marry
Look at me, I am old
But I'm happy

I was once like you are now,
And I know that its not easy
To be calm , when you found
Something going on

But take your time
Think a lot
Think of everything you got
For you will still be here tomorrow
But your dreams may not

How can I try to explain
When I do he turns away again
Its always been the same
Same old story

From the moment I could talk
I was ordered to listen now

There's a way , and I know
I have to go away
I know, I have to go

And all the times, that I've cried
Keeping all the things I knew inside

And it's hard, but harder to ignore it
If they were right, I'd agree
But it's them they know, Not me now

There's a way , and I know

That I have to go away 
I know, I have to go 

Wednesday 25 August 2010

SQL Snippet - How to count the number of characters in a string

I've come across a number of methods to count the number of characters in a string in SQL Server, but this is by far the most clever:


SELECT LEN('How to count no. of o') - LEN( REPLACE('How to count no. of o','o','') )

The replace function replaces all 'o's with '', therefore removing them.

The difference in lengths is therefore the number of 'o's.

Thursday 19 August 2010

Lyrics - Yeh jo Halka Halka Suroor Hai (Ustaad Nusrat Fateh Ali Khan)

Saki ki har nigaha pe balkha ke pee gaya
Lehro se khelta hua lehra ke pee gaya

Aye rehmate tamam meri har khata muaaf
Mein inteha e shauk mein ghabra ke pee gaya

Pee ta bagair izn, yeh kab thi meri majaal
Dar parda jashne yaar ki sheh paake pee gaya

Zahid yeh meri shokhiye zinda na dekhna,
Rehmat ko baaton baaton mein behla ke pee gaya

Udi udi ghataye aati hai,
Mutribo ki navayen aati hai
Kiski yeh soo khuli hai saawan mein
Mehki mehki hawaein aati hai

Aao sehne chaman mein raks kare
Saaz lekar ghataye aati hai,
Dekh kar unki akhniyo ko adam,
mehkado ko hayae aati hai

Paas rehta hai , duur rehta hai
koi dil mein zaroor rehta hai

jab se dekha unki aakhon ko,
halka halka suroor rehta hai

aise rehte hai woh mere dil mein
jaise zulmat mein noor rehta hai

ab adam ka yeh hal har dam
mast rehta hai, choor rehta hai