Go to home page mail me! RSS Feed

MS Sql Server

Concatenating multiple rows into single column in SQL Server

Sometimes you need to return a single column that contains values that are comma separated or pipe separated or what ever floats your boat from a multiple row result set, a perfect example is returning the category id’s for a product that could be in one of more categories but you don’t want to return multiple rows with duplicate information. There are two ways of doing this or two that I know of – meaning simple enough. 1. The COALESCE method, which is probably the most common. This method works by tricking the coalesce function into doing something...

posted @ Tuesday, September 29, 2009 3:44 PM | Feedback (3)

Microsoft SQL Server 2008 CTP - on the loose.

The MS SQL Server 2008 CTP (version 10) is now available to download. Remember that this is a community technical preview. The Microsoft team will use your feedback to refine and enhance the product and off course it expires in 180 days. You will need at least XP with service pack 2 to get it running, it also works on Vista, 2K3 and 2K8. Download SQL Server 2008 CTP Visual Studio 2005/2008 does not support SQL Server 2008, however, you can download the necessary updates that will give you the support. Download VS2005 support here and VS2008 support here and YES...

posted @ Tuesday, February 26, 2008 3:45 PM | Feedback (0)

Get schema information from SQL Server

Database access layers (DAL) are still archaic and hard to design and develop, for the .Net developer there are tons of ways to design a DAL. As for me, I got fed up a few years ago and basically used generators to generate the layer for me and as time passes by I needed something more custom to my style of coding, so I developed my own custom DAL generator. Anyway, to cut a long story very short, SQL server has advanced forward, so I have to keep updating the generator every now and then, mainly because there are simpler ways of...

posted @ Tuesday, January 08, 2008 9:35 AM | Feedback (0)

Free SQL Server Tools

Stumbled across a link to a set of FREE SQL Server tools from IDERA. Check them out, you never know when you are going to need them. SQL Safe Free High Performance SQL Server Backup & Recovery Tool Idera’s SQLsafe Freeware Edition is free SQL Server database backup and recovery tool based on our award-winning SQLsafe product. SQLsafe Freeware Edition gives you a really high-performance backup and recovery engine, a scriptable interface (command line and XSP) and the ability to backup and compress any size and any number of databases, all for free.   SQL Check Free SQL Server Performance Dashboard...

posted @ Tuesday, November 20, 2007 10:57 PM | Feedback (0)

Building a custom ASP.NET paging control

As an IT Consultant with numerous number of projects that has to do with a lot of data which at the end of the day requires paging - I'm really tired of writing paging methods for every project. Therefore, on this nice beautiful Saturday I've decided that I'll knock out a paging control which I'll gladly call the Data Pager Control. It's almost inevitable to get a project these days that doesn't require some kind of data management. The two major aspects of web development that takes the majority of my time are: UI and Data Access. I've taken upon...

posted @ Sunday, October 14, 2007 12:47 PM | Feedback (3)

SQL Server @@IDENTITY, SCOPE_IDENTITY and IDENT_CURRENT

Ok, these 3 functions could be confusing - I have seen people use these functions in-appropriately, so I decided to put together a basic list of differences between them. These are points that should be noted before using any of these SQL functions included in the title. These functions are very similar and should be used carefully If no inserts occur @@IDENTITY will be NULL If multiple rows are inserted, @@IDENTITY will hold the last identity value generated @@IDENTITY does not revert to the previous setting if the insert/select into statement fails - same applies if the transaction is rolled back. @@IDENTITY and SCOPE_IDENTITY...

posted @ Tuesday, July 17, 2007 4:20 PM | Feedback (0)

SubSonic 2.0 BETA 1

Rob has recently announced that SubSonic 2.0 BETA 1 is ready for download. SubSonic is my favorite library, nothing comes close - not even EntLib. If you haven't used it, step out now and give it a try. It is simply faster and better. Great Job guys! Here are some of the cool new features: Multiple database support - I've been waiting for this feature! Support for EntLib 3.0 New command line tool Improved querying New custom controls bug fixes and more...   Read...

posted @ Tuesday, April 10, 2007 2:28 PM | Feedback (0)

Next entries »