Category Archives: SQL

Dynamically sorting by a column in a Stored Procedure (SQL Server)

Have you ever needed to build a stored procedure that would take the name of a column as a parameter, and return the results ordered by that column? So have I, so after researching it for a couple of days, … Continue reading

Posted in Programming, SQL | Tagged , , , | Leave a comment

SQL – Select using current day…

I’ve had this problem a few times, and many people always ask me it… so here it is immortalised. If you require to select all records added to your table for the current day use the following where clause – … Continue reading

Posted in Programming, SQL | Tagged , , | Leave a comment