Thumbnail image for UNPIVOT in Oracle 11G to Select Columns As Rows

UNPIVOT in Oracle 11G to Select Columns As Rows

You can easily transpose table columns to rows in Oracle 11G+ using the UNPIVOT clause is SQL. A comparison of the pre-11G DECODE solution with the 11G+ UNPIVOT method.

Read the Full Article →
Thumbnail image for SQL to Select Rows Conditionally Based On Column Value

SQL to Select Rows Conditionally Based On Column Value

SQL solution to select rows conditionally based on column value – for example, a priority column tagged to a set of rows, with a requirement to select only the rows with top priority.

Read the Full Article →

ORA-12560: TNS:protocol adapter error

Sometimes you try to login to your Oracle XE and get a blocker ORA-12560 : TNS:protocol adapter error. Top reason why this error might occur and how to fix it.

Read the Full Article →
Thumbnail image for ORA-01450: Maximum Key Length Exceeded – Possible Causes and Fix

ORA-01450: Maximum Key Length Exceeded – Possible Causes and Fix

“ORA-01450 maximum key length (6398) exceeded” might occur when a table index is being created in the Oracle database. Possible reasons why this error shows up and how to fix it.

Read the Full Article →
Thumbnail image for I want to learn Oracle. Where should I begin?

I want to learn Oracle. Where should I begin?

Here is a simple guide to help you learn Oracle as a developer from scratch, on your own. Beginner-friendly Oracle Learning Library courses and free Oracle environments for hands-on practice.

Read the Full Article →
Thumbnail image for What are CBO and RBO?

What are CBO and RBO?

Oracle’s inbuilt optimizers – CBO and RBO: how they work to improve query performance, and key differences between cost-based vs rule-based optimization.

Read the Full Article →
UTL_HTTP to Call a Web Service from PL/SQL

UTL_HTTP to Call a Web Service from PL/SQL

You can call a web service from PL/SQL using the Oracle-supplied package UTL_HTTP. This article demos a PL/SQL script to invoke a web service and read its response into a CLOB. It also describes typical errors you may encounter in web service calls and how to resolve them.

Read the Full Article →
UTL_FILE: Write to file example in PL/SQL

UTL_FILE: Write To File Example and Debugging Common Errors

Example of using UTL_FILE in PL/SQL to write to a file. Plus, ORA errors and solutions to common problems faced with UTL_FILE.

Read the Full Article →
Thumbnail image for SQL to Find Master Records with Identical Detail Records

SQL to Find Master Records with Identical Detail Records

SQL to find those records in the master table that have identical detail records in a child table.

Read the Full Article →
Thumbnail image for Replace Duplicates in ID Column with Unique Values

Replace Duplicates in ID Column with Unique Values

A solution to the requirement of replacing only the duplicate IDs with unique values in a database table, and letting everything else stay untouched.

Read the Full Article →