Category: SQL

Posted on: September 29, 2020 Posted by: ndconsultingllc Comments: 0

ApexSQL – Search Entire Database

The Problem – Find A Specific Database Value I’m writing a custom SQL report and need to find where a field is stored in the database or I’m looking for a specific column, however, I cannot recall when table the column resides. In the past, I’ve used various stored procedures…

Posted on: September 22, 2020 Posted by: ndconsultingllc Comments: 0


USE SQL’S GOTO TO BOUNCE AROUND A STORED PROCEDURE While working on a recent project, I found SQL Server’s GOTO label to skip sections of code that you don’t want to execute when various conditions have been met. In the below example from Microsoft, you see if the counter =…

Posted on: July 21, 2020 Posted by: ndconsultingllc Comments: 0

Splitting a String with SQL

There are times when writing a custom report, that a string is returned and you will want to bust up the string and process each value individually. With SQL Server 2016, you can simply use the built-in function “split_string”. For SQL Server databases prior to SQL Server 2016, you have…