Tag Archives: tsql
Having to write some SQL SELECT’s on some un-normalized tables left me thinking there has to be a tidier way. I started with: (@SCAN_ID is a variable declared earlier) I ended up with: Maybe not a massive improvement, but personally … Continue reading
Just been rewriting some SQL Server stored procedures for a client. There were a lot of SELECT statements like the one below: I’ve seen this quite a few times, and I’m not suggesting this is wrong, however I find that … Continue reading
Lets assume that we have a stored procedure that is defined in the following way, it doesn’t really matter what the actual body of the SQL is: We want to be able to call this procedure from an ASP.net page … Continue reading
Quickly find SQL Objects that you updated “today”: Clearly if you wanted to change the updated date you could enter a specific date or range.
Having the need to do a column rename in the DB I wanted to try and find all references to the column to ensure I didn’t miss any. By using the INFORMATION_SCHEMA views in SQL server I used the following … Continue reading
I recently had an issue with some data grouping in a third party application where data that appeared to be the same, was being grouped separately. E.G. Example Data: AB AB AB BC BC BC BC BC BC DC When … Continue reading