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
MySQL day of week ending on Friday
MySQL

MySQL day of week ending on Friday

Week Ending Date has been requested a lot more frequently now. It's an odd one but the example below shows how to do this for when the week ends on Friday. Assuming it starts on the previous Saturday.

Read note 26,856 hits
No rows returned in Oracle causes SP to fail
Oracle PL/SQL

No rows returned in Oracle causes SP to fail

The problem is that if the student does not have a username but has an ID number, then the first query returns NO ROWS and then the second query errors and the whole stored procedure fails. The same problem happens when using these as a subquery which has an empty result set. Furthermore I am using this stored procedur...

Read note 41,772 hits
Basic Oracle Stored Procedure Structure
Oracle PL/SQL

Basic Oracle Stored Procedure Structure

I asked someone for a simple, easy and basic Oracle stored procedure as my MySQL and T-SQL stored procedures work slightly differently and are easier to pull off. After much umming and aah-ing, I have written this article as a note for me to demo a working stored procedure and how to use cursors. I'm told I need to use...

Read note 39,188 hits
Basic Oracle Function Structure
Oracle PL/SQL

Basic Oracle Function Structure

I need to refer to how to create a function in Oracle PL/SQL and sites on the net just attempt to overcomplicate everything and have forgotten how it is to be new to Oracle. I need a function in it's simplest form and if I want to torture my successors, I'll complicate the function myself. How? Functions are supposed t...

Read note 29,700 hits
Getting the mysql where in delimited string to work
MySQL

Getting the mysql where in delimited string to work

I have a mySQL database table of room assets that has a field containing the ID numbers of images relevant to this room. The Problem? When I select specifying the statement "WHERE IN (c.RoomImages)", this is interpreted as a string and when converted to a number only retrieves the first value before the first comma. Co...

Read note 26,140 hits
MySQL Group_concat equivalent in T-SQL and Oracle
Databases

MySQL Group_concat equivalent in T-SQL and Oracle

MySQL is just the best Unfortunately I make a living using Microsoft and Oracle products. I shouldn't say unfortunately as I don't see myself doing any other job and it beats daytime television any day. I use this quite a lot so I thought I'd put an article here somewhere. Based on the following concept: RowID column_t...

Read note 34,339 hits
MySQL last year week month day trend periods
MySQL

MySQL last year week month day trend periods

Why? I recently made a joomla module that displays the lastest members to signup. It goes a little further and counts activated accounts for the past day, week, month and year (the below examples count all accounts irrespective of being activated or not). It needs to pick up trends as well and compare for example today...

Read note 24,513 hits
T-SQL Record Separator
Transact-SQL

T-SQL Record Separator

I have googled, binged and asked but to no avail. Some self-proclaimed IT experts in forums said "why would you want to do that?". Unhelpful Bellends. It's a bit like asking me "Why can't I turn on my computer" and me replying "why would you want to do that?". Anyway, I was looking for something like the record separat...

Read note 66,349 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.