Archive for the ‘SQL Server’ Category

SQL Server Report Builder: how to access a TextBox value

Thursday, September 24th, 2009

I recently needed to access a TextBox value in an expression in one of my SQL Server Report Builder (SQL Reporting Services) reports recently, and found it surprisingly hard to find the answer).

SELECT DISTINCT and ORDER BY

Wednesday, June 24th, 2009

ORDER BY items must appear in the select list if SELECT DISTINCT is specified. Recently discovered the above error (T-SQL, SQL Server) when trying to select DISTINCT rows for one set of columns while ordering the rows by another column. Jeff Smith had a good explanation of why this occurs (article). In ...

LINQ TO SQL : WHERE X IN ()

Monday, June 22nd, 2009

I recently needed to do a WHERE X IN () style query using LINQ to SQL. Here's the solution I used:

How to use DISTINCT on a single column of a multi-column select statement

Saturday, December 6th, 2008

I recently came across this problem today of how to perform a SELECT DISTINCT but on a single column of a multi-column select statement. Imagine a database with a COUNTRIES table. The table contains a list of countries and there is also a "Nationality" column (eg. Australia is the country, ...

ASP.NET - what is the App_Data folder for?

Sunday, November 30th, 2008

In addition to supporting server databases, Visual Studio 2005 / 2008 also supports local databases in an App_Data folder. Finding a clear answer as to what the folder is for was not easy but my basic understanding is this:

.NET Data Access strategies overview

Saturday, November 29th, 2008

Due to the increasing number of data access strategies being introduced to .NET with little guidance on which to use I decided to create an overview of the different methodologies available. This is really just a cheatsheet for myself but maybe it's useful to others as well...