blog
My blog of techy stuff, ranging around SQL (SQL Server, that is), C# and .net, JavaScript and a smattering of stuff about the Orchard CMS (that powers my site) as I get more familiar with it. There's the occasional non-technical post when something is of interest to me that I feel is worth sharing, but they should be few and far between
-
Quick Tip: Randomising a resultset from a SQL query
Sometimes I need a random (random enough for my purposes - I don't know, nor care, if it meets a formal definition of random) sample of N rows of data from a table. There's a very quick way to do …
-
Creating projects and solutions using the dotnet command
I've been digging into .NET Core a little bit more recently, with the intention of using it for an upcoming project at work (sssh, don't tell anyone - they don't know yet!) and part of that has …
-
Always make sure you specify the length to CONVERT in SQL
Over the years I've seen this potential blackhole of data loss several times, a developer has written CONVERT(VARCHAR, [ColumnName]) without specifying the length of the VARCHAR to convert the column …
-
SQL Server 2016 syntax for dropping objects
SQL Server 2016 introduced a new syntax for dropping objects, that I've known about for quite a while. I've been surprised by the number of people that aren't familiar with it so thought I'd put …
-
Structuring UPDATE and DELETE queries so that they're a little bit safer
Quite often I've seen someone who wants to update a table, or delete rows from a table write a SELECT query to work out what data they want then separately write an UPDATE or DELETE query to …
-
Using Google Analytics to track page views in an AngularJS single page application
If you're using Google Analytics to track page visits across your application, getting this working in an AngularJS application is a little bit more complicated than simply dropping the GA …
-
TIL: Queries against linked servers... Be careful how you structure them!
The fact that a query across a SQL linked server (to another SQL server) is sometimes off-loaded to the remote server and sometimes not even when the entire query is operating on the remote data is …
-
Braces on new lines in Visual Studio Code
Here there be dragons: Some people prefer their braces on the same line, some prefer them on the next line. If you're in the latter camp then the default in Visual Studio Code will annoy you - it's …
-
Using Visual Studio Code, Node.js and gulp.js to create a web application - Handling changes
This is going to be quite a short post, there's not a lot to getting the gulp script to re-process any changed files - but it's a very useful thing to have!
Other parts of this series
Using …
-
Generating an SSL certificate with SANs via a Windows Certificate Authority
There are doubtless other ways to generate an SSL certificate through a Windows Certificate Authority which have associated SANs (Subject Alternative Names), but one way I've found is particularly …