Showing posts from July, 2009

DareDevils v/s Blazers. July 27 2009. Match 18.

Ravi Bachala's timely 31 enabled the Blazers to another victory. He put up a show of classy batting today for the Blazers. DareDevils fought back well but could not come up with a win. What this means is that DareDevils are out of semi final race. They play Cheetahs next in the last round robin game of the tournament.

The Blazers won the toss and elected to bat first. Ravi Bachala started the innings with Ravi K. By the time, the first wicket fell, Blazers had scored 19 of 2 overs. Ravi Bachala was timing the ball well and hit 2 sixes and 2 fours on his way to an impressive 31 runs. When He got out, the score was 59 in 5 overs. This was the break through, the DareDevils needed, as they tightened the screws on the Blazers. Sunil played his part and scored 10. Ramesh batted sensibily along with debutant Makam Ravi, to take the Blazers to a total of 84. For DareDevils, Suman took 3 wickets with his accurate bowling.

The DareDevils lost a wicket in the first over. Vinod joined Suman and…

Blazers v/s Veterans. July 25 2009. Match 17.

A power packed innings from Manohar resulted in a win for the Blazers in a tight last over finish. The Veterans and Blazers gave an impressive performance but Manohar's innings made the difference.

The Veterans were put in to bat by the Blazers. Shiva looks to be like Sehwag for the Veterans as He hit 2 big sixes again, one in the very first over. He made a quick fire 17. Rajesh and Radha formed a good partnership and both top scored for the Veterans with 26 runs. Both hit some amazing shots over square leg and mid wicket. Rajesh hit 3 fours and a six, Radha hit 2 sixes with one four. The Veterans scored a challenging total of 90 runs in their 10 overs.

The Blazers started with Dennis and Ramesh. Ramesh, minus his usual business formal dressing this time, started with a bang as He hit a big six over square leg. He followed that with another six and Blazers were right on track. Dennis played his part and hit a huge six over mid wicket region and the game was going away from the Veter…

DareDevils v/s Power Builders. July 25 2009. Match 16.

The DareDevils registered their first victory of the tournament eventually knocking out Power Builders from the semi final race. Some decent batting from DareDevils made sure they got a much deserved victory in only 8 overs.

DareDevils won the toss and asked Power Builder's to bat. The Power Builders started well with Satish and Harsha. Harsha scored 20 and Satish top scored for the Power Builders with 31. The Power Builders were 37 for 1 after 4 overs and finished with only 73 in 10 overs as no other batsmen performed. Mohan picked up 3 wickets for the DareDevils followed by Senthi and Selva with 2 each.

The DareDevils started with Abhishek and Suman. Abhishek took the game away from Power Builders as He hit 2 big sixes. This is just what DareDevils needed after their tough loss a day before against the Veterans. After 2 overs, they were 22, way ahead of the required run rate. Karim bowled his heart out and gave away only 2 runs, with 1 wicket, in the 3rd over to bring back the Pow…

Cheetahs v/s DalCha. July 25 2009. Match 15.

The Cheetahs found themselves unlucky again as the match ended up in a very close finish. The Dalcha's would be very happy to get their 3rd win when it looked like they are about to throw the game away.

Cheetahs won the toss and asked Dalcha's to bat. The Dalchas started badly and were 3 down for 25 at the end of 5 overs. In came captain Ujwal and Arif to the crease. They started rotating strike well and got 25 runs in next 2 overs. They were 49 for 3 after 7 now and were heading towards a decent total. But Ujwal and Arif thew caution to the wind and started going after the bowlers. The last 3 overs resulted in 40 runs and Dalcha were sitting pretty with a total of 89 in 10 overs. Ujwal played a captains knock and top scored with 44 not out, with 4 fours and a six. He was very well supported by his partner Abdul Razzaq a.k.a Arif, who scored 32 not out with 3 sixes.

The Cheetahs started with Anand and Ganesh. Ganesh was first to go, bowled by Karim. Anand played good and hit a s…

Veterans v/s DareDevils. July 24 2009. Match 14

Winning is a habit they say and Veterans are the only team so far with this habit. They got their 4 straight win today with another team performance. The DareDevils were in the game but could not finish the game on a winning note.

DareDevils won the toss and put the Veterans to bat. Shiva opened the batting for Veterans and started with his usual style as He hit a six. He got out trying to go for a second run and was well short of the creaase. The other batsmen struggled to get going and suddenly the Veterans found themselves in a big hole with 7 down for only 34 runs in 6 overs. The last pair of Nilanjan and Uma started getting runs and it was looking like the Veterans would not finish their full 10 overs. But credit to Nilanjan and Uma who made sure there were no more damages and they continued taking ones and twos, followed by odd boundary. Nilanjan top scored for Veterans with 16 and Uma scored 12. Together, they put a 31 runs partnership for the last wicket. The Veterans made 65 a…

Hawks v/s PowerBuilders. July 23 2009. Match 13.

Just last night, I finished writing about Kareem from Dalcha. Today it was another Karim from Power Builders, who hit some crazy Afridi style sixes to guide Power Builders to a victory. The game was full of excitement and pressure. The Power Builders gave a complete team performance, much like their opponents, Hawks.

Sagar won the toss and elected to bat first. The opening duo, Sashi and Bhavin started well. They put on 18 runs of the first 2 overs. Bhavin scored 16 and Sashi made 8. The Hawks went for their shots and were caught on the boundary. Satish of Power Builders was very impressive as He caught 3 catches in the deep. Vinay was playing well and was making the life difficult for fielders, especially at long on as the ball would turn twice or thrice before reaching the fielder. You all know who was standing there. :-). Vinay was caught on the boundary by an absolutely brilliant one handed catch by Harsha. Vinay top scored for Hawks with 22 runs and in the process, hit some beauti…

SQL Server Deadlocks. Applies to 2000 and latest, 2005 2008 versions

Found a very good article about SQL Server 2000 Deadlock problem.

Here is the link SQL Server A Deadlock Occurrence and Resolution

Replace, Substring, CharIndex magic / usage in SQL Server 2000


This post covers 3 amazing functions in SQL Server 2000 ( I am sure you can use them in SQL 2005 or 2008 for that matter). They are Replace, Substring and CharIndex.

So my challenge was to replace ssn in a text and return the full text with only SSN part formatted as SSN : xxx-xx-1234 format. So I combined these functions this way.

1. first find the place/locations where the text SSN appears in the column using

2. then use Substring to use the number returned from step 1 and give the lenght of characters to be returned
substring(status,charindex('ssn',status), 11)

3. Finally use replace function, to use step 2 and step 1 i.e. replace the characters returned by both steps with your text i.e.

select replace(status, substring(status,charindex('ssn',status), 11), 'SSN : xxx-xx-') from sometable where condition = condition.

Hope this helps.