Some time ago I had to build an integration app that would on occasion query from a SQL Server 2012 database and based on the […]
How to achieve the LIKE IN effect in SQL Server
SQL Server does not natively support a “LIKE IN” clause. For instance the following example is not valid: Luckily there is a way to achieve […]
Remove leading zeroes from varchar
The following example shows one way how you can remove leading zeroes from a varchar column in SQL Server: Returns:
Concatenate Strings from a Column Into a Single Row
Sometimes there is a need to concatenate strings from a column into a single row. Some databases already provide a solution with the GROUP_CONCAT() aggregate […]
Count Word Occurrences in Oracle String
As of Oracle 11 you can use the REGEXP_COUNT function to count the number of occurrences of a word or string in a varchar. However, […]
SQL Developer with a DB2 Database
Originally called Raptor – SQL Developer has become quite a decent SQL Development tool over the years. The nice thing about it, besides the fact […]
Catching errors in Oracle
Sometimes there is a need to find out exactly which Oracle errors are occurring in your code, because your application stacktrace or your log files […]
Order of predicates in WHERE clause
It is often assumed that the order of the predicates in the WHERE clause of an Oracle SELECT statement does not matter or that it […]
Regular Expressions in Oracle
Regular Expressions (RE) are a powerful feature in Oracle. I have found them to be most useful for situations where you need to quickly find […]