Skip to content
If you’re building a string using an SQL statement, you can split results with “new lines” using CHAR() to insert...
SQL Management Studio is the must use tool for SQL database administrators, however every time I’ve needed to install it...
The following steps show how to create an SQL “create table” script – based on an existing table – using...
When building complicated SQL statements often I will make use of a SELECT – FOR XML PATH statement to concatenate...
When you have a date or datetime column in an SQL database, it will output a value that looks like 2017-01-01...
As a database administrator one of the important data health checks you can perform is checking that email addresses being...
The following shows how use a simple SQL statement to create a list of unique values and a count of...
The following steps show how to make a Crystal Report show only unique records. This example is using Crystal Reports...
In an SQL statement, the IN operator allows you to multiple values in a WHERE clause, for example: SELECT *...
The following SQL statement shows how to combine a column into a single text string – separated by a comma....
The following example shows how to use a regular expression (a regex) to search for information in an SQL database....
The following SQL shows how to get the current financial year using SQL. This assumes that the financial year for...
In WordPress the WPDB class is available for interacting with the database, for example reading or writing data. The PREPARE...
Problem If you try to use a column alias in a where statement, you recieve an error message that reads...
The following SQL can be used to remove leading and trailing spaces from a columns values. Ideally the system that...
The following T-SQL for Microsoft SQL Server shows how to search for accented text without having to use the accented characters in...
The following SQL shows how to select a row from a table using the current year as the WHERE condition....
The following SQL shows how to select a row from a table using the current financial year as the WHERE...
There are many commercial tools to help you design and test SQL statements, as well as the execution tests in...
The following T-SQL for Microsoft SQL Server shows how to convert line separated text to comma separated text. For example, if we...
The following T-SQL shows how to update a value using the results of a SELECT query. This applies to Microsoft...