Delete Duplicate Records – Leave Only 1 Behind MS SQL

Recently I’ve had to delete duplicate records from the Record Link table in Microsoft Dynamics Nav. Using the following SQL, (which uses the OVER clause for partitioning) this deletes all duplicate records, leaving the first unique item behind. The SQL can be updated easily to function for other tables /…

Microsoft Dynamics NAV – View All Active Sessions

With Microsoft Dynamics Nav, there are various ways of viewing all the active sessions within the system. The easiest of which is the “Sessions” page within the software itself: The downside of this, is that it only shows active sessions on the tier which the user is connected. This is…

Remembrance Sunday – Poppies at Conisbrough Castle

In remembrance for 100 years of the Battle of the Somme, local people and businesses donated towards lighting up Conisbrough Castle. The castle was lit up for 3 days, and raised well over £1500 for British Legion and the renovation of the local cenotaph/park. It is estimated over 5000 people…

Free Gousto Meal Box (well near enough…)

Following on from my last post, I’ve had an email through to allow 1 person to try a meal box for £1. Plus then 50% off your 4th box (if you subscribe, if you dont, just have the 1 box!) First come first served..! ONEPOUND3SCY Code expires 10th November 2016.

Gousto Meal Box – £25 off First Box

A few weeks ago I visited a country fair and got talking to a rep from Gousto. Having taken up his time, I signed up for a reduced rate trial of their boxes… The idea behind the boxes are to have fresh “meals” delivered to your door, (well the ingredients,…

Convert MS SQL Query to MySQL Automatically

With a recent project, I’ve had to reproduce a table from a Microsoft SQL Database into a MySQL Database. The table had lots of fields and would be very time consuming to write the SQL to create the table, but luckily I came across this tool to convert MSSQL to…

SQL Remove Trailing Decimal Places

Within a recent project, I’ve been extracting data from Microsoft Dynamics NAV using Taskcentre. Within NAV, decimals are stored as decimal(38,20), complete will all 20 decimal places..! The following SQL query is very handy at removing the un-required decimal places (but keeping the accuracy of the data) The results of…

SQL Server – Find Last Backup Date/Time

With SQL server and 3rd party backup software, it can sometimes be difficult to tell when the last SQL backup has been taken and if the backup software has actually performed the backup or not. There are 3 main backup types in SQL Server: Full Incremental Transaction Log The following…