JOEL LIPMAN Systems / Automation / AI

Knowledge base / Since 1999

Databases Tutorials & Guides

Practical Databases tutorials, troubleshooting notes and implementation guides from real projects.

Advanced search

75 entries / Databases

Clear filters
Error 1065: Query was Empty
MySQL

Error 1065: Query was Empty

In view of the fact that this error pops up in so many systems I take over, I have often gone down the wrong path following the red herring as it were when in fact the answer to this is very common.

Read note 25,432 hits
DataScramble - Randomizing data rows
Transact-SQL

DataScramble - Randomizing data rows

Along with my DataJumble function and DataTumble procedure which also help scramble database tables sent to suppliers/developers, this is a function which simply finds random characters and inserts these. I would recommend using the DataTumble script over this one as this leaves data very difficult to work with: Before...

Read note 36,320 hits
DataTumble - Randomize Data Rows
Transact-SQL

DataTumble - Randomize Data Rows

This is a stored procedure I've nabbed from some consultants from my day job. It shuffles the records and matching data values: Before: ID Name DateOfBirth --------- ------------ ----------- 1 John Smith 1988-06-24 2 Fred Bloggs 1972-11-17 3 Another User 1964-02-18 After: ID Name DateOfBirth...

Read note 27,705 hits
Search a database for a value and count matching rows
Databases

Search a database for a value and count matching rows

We have a datawarehouse and we want to be able to count all the records in any table of the database that match on a particular warehouse load. This is a column value where the column is called "WarehouseLoadKey" and the value we want to search on is "3" (the 3rd incremental load). How? The below stored procedure can b...

Read note 37,960 hits
Convert a delimited string to table
Databases

Convert a delimited string to table

This is a quick note to show you how to convert a given comma delimited string into a database table: Given: "Title,Forenames,Surname" Return: ID Value ------ ---------------- 1 Title 2 Forenames 3 Surname Note the below example omits the ID column and just leaves VALUE.

Read note 16,491 hits

Working principle

Our Purpose

This site exists as a practical knowledge base built from real-world experience across systems, platforms, and technologies since 1999. Much of the content documents solutions, edge cases, and working patterns that were learned through investigation where documentation was incomplete or absent, and is shared to reduce the same friction for others.

27 Years in IT
1021 CRM clients
810 Site articles
29.7m+ Reads / hits

Knowledge base

Search notes

Find matching words in article titles and content.