Skip to main content

Posts

Showing posts from April, 2007

HOW TO FIND DUPLICATE ROWS IN A TABLE (SQL)

If you are saddled with the task of finding duplicate rows in a table using SQL. It is a simple task even though it is not a place you should find yourself because you need to make sure your records are well indexed at the time of creating your table. Now that the worst has happened. All you need do is to select the row that has the duplicate values and count for each of the rows using a GROUP BY clause. For convenience sake, you can order by the same column in question as shown below: SELECT CurrentDate, COUNT(*) FROM tblSingleRate GROUP BY CurrentDate ORDER BY CurrentDate CurrentDate Count(*) 2007-03-12 1 2007-03-13 2 2007-03-14 2 2007-03-15 1 2007-03-12 1 2007-03-13 1 2007-03-14 2 2007-03-15 1 Duplicates are marked in red. QED!

Microsoft Silverlight

It appears the web is getting all the focus in systems development these days as there are new emergence at the National Association of Broadcasters conference (NAB2007). Microsoft Corp. unveiled Microsoft® Silverlight™, a new cross-browser, cross-platform plug-in for delivering the next generation of media experiences and rich interactive applications (RIAs) for the Web. The encouraging thing is that the big names in the media industry are in full support of this development. Let's buckle up then as we move to get the best done. It is the world of Microsoft Silverlight as WPF/E lost the title yesterday. Happy coding guys!

ASP.NET CODE GENERATION TOOLS

There is a lot to learn especially if you are just starting out as an ASP.NET developer. A new free code generation tool now in beta 3 has just been released. It is time for coders to seat down and relax a little because life has been made easy again. I have only explored this tool a little but I can see some similarities with codesmiths, nettiers etc. in it. It generates data and UI for you You need to try it out and see if you are curious like myself. Check it out here: http://www.codeplex.com/actionpack If you are keen on using code generators or would like to find out more. See http://www.castleproject.org/

UPLOAD T-SQL AND DATA MADE EASY

I came across this nice tool some months back which I believe would be useful to some folks out there that have been thinking of how to deploy their applications with zero percent stress. The tool released by Microsoft as a free download is called The SQL Server Database Publishing Wizard. Replicating your database on another server has been made easy. Pick it up, it is yours. Find the download here: http://www.microsoft.com/downloads/details.aspx?FamilyID=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en

SITEMAP SECURITY TRIMMING

securityTrimmingEnabled intellisense was spelled wrongly in ASP.NET 2.0. Note that the correct syntax should be SecurityTrimmingEnabled = "true" or SecurityTrimmingEnabled = "false" in your stemap file. There is a provision to use SecurityTrimmingEnabled in both web.config and sitemap files respectively.

LOOP THROUGH A DATASET

I had a reason to loop through a dataset today and I was just wondering someone could be in need of this. I believe it is straight forward. I am assuming here that you have already created your dataset (ds). foreach (DataRow dr in ds.Tables[0].Rows) { //Do whatever you like here with the rows returned Response.write(dr["columname"].ToString()); }

Starting out...

I have been thinking of starting a blog about my career for a very long time now and I finally made up my mind to do something today. This no doubt is the resurrection power at work. Hope this will help somebody out there to do their work better. Yours in the development world.