Oracle:- Error – “ORA-24374: define not done before fetch or execute and fetch”

Background Before quickly closing out tabs from my database client, I will like to share an error I received this morning.   Error Error Image Error Text     Remediation Outline Query Revised Query Single Comment Line ( -- ) Keep only a single repeating comment line Discard extra comment lines Multi-Line Comment ( /*  … Continue reading Oracle:- Error – “ORA-24374: define not done before fetch or execute and fetch”

Dbeaver:- SQL Server – Script table data – Database / Catalog Name

Background A couple of years ago, I noticed that there is a tiny hole in DBeaver's implementation when generating SQL for data in a SQL Server Instance.   Database Oracle Scenario - Omit Schema Name Outline Launch DBeaver Connect to Oracle Database Instance Select Schema In our case, SCOTT Select Table In our case, EMP … Continue reading Dbeaver:- SQL Server – Script table data – Database / Catalog Name

Format Numbers As String ( Native Database Functions )

Background This a Quick follow-up to our last post. Lineage Transact SQL:- Format Numbers As String Published:- 2023-July-10th Link Function and Formating Mask Here are the functions and the formatting masks for various databases.   Company Database Platform Function Minimum Version Supported Syntax Sample Microsoft Transact SQL format v2012 'N0' Oracle, PostgreSQL PLSQL TO_CHAR 'fm999G999999999999' … Continue reading Format Numbers As String ( Native Database Functions )

Oracle:- Querying Mixed Datatype Columns

Background Recently I was querying an Oracle Database. One of its columns is a mixed datatype column. In this case, the column has both strings and numbers. Needing to wise up quick on how to check the data before using it.   Sample Sample -01 Objective We will use a couple of Oracle built-in Functions … Continue reading Oracle:- Querying Mixed Datatype Columns

Oracle – Temporary Table – Drop Table

Background Using Temporary Table Outline Temporary Table Create Temporary Table Option:- On Commit On Commit Preserve Rows On Commit Delete Rows  Discard all existing Data Truncate Table Insert Data Insert Data using "insert into" Fetch Data Fetch Data using "select" Truncate Data Truncate data from temporary table using "truncate table" Drop Table Drop Table Using … Continue reading Oracle – Temporary Table – Drop Table

Oracle – DATEDIFF Using Arithmetic

Background Earlier this week I needed to determine the difference between two dates. In Transact SQL, I will employ datediff. In Transact SQL, datediff allows one to compare two dates using years, months, days, hours, minutes in terms of measurement. Oracle Sample SQL Result Grid Image Textual friend DateMet nowUsingToChar nowUsingToCharFormatted numberofDaysFractional numberofDaysFractional ( 3 … Continue reading Oracle – DATEDIFF Using Arithmetic

Oracle – SQL Developer – Customize – Editing – Preferences – Tabs Versus Spaces

Background Let us begin the process of customizing our SQL Developer Editor. Outline Preference Tabs Versus Spaces Show White Spaces Tasks Preferences Preference - Tabs Versus Spaces Outline Access Menu Access the Menu and select Tools and Preferences In the Preferences Window Within the left navigator tree, access the options Code Editor / Format / … Continue reading Oracle – SQL Developer – Customize – Editing – Preferences – Tabs Versus Spaces

Oracle – DECODE – Check if two values are same

Background Looking at some sample code. The purpose of the decode function was lost on me until I looked at it more. Code Output   Source Code Gist DanielAdeniji/OracleDecodeCompareDates.sql Link   Summary Took to the lab and confirmed that decode was simply used to compare if the first two values are same. If same, return … Continue reading Oracle – DECODE – Check if two values are same

Ars Technica – Jim Salter :- Linus Torvalds on ZFS File System – Rebuttal

Background I like Google News as it offers an aggregated snapshot of the days trending news. I caught wind of Linus Torvalds take on the ZFS File System and his reticence to merge it into Linux Core. The reason he cited is Oracle's litigious posture. Jim Salter's Response Link Introduction Last Monday in the "Moderated … Continue reading Ars Technica – Jim Salter :- Linus Torvalds on ZFS File System – Rebuttal

DBeaver – Database Connection Configuration – Oracle – Oracle JDBC Driver

Background Towards a couple of sample Oracle Database sample exercises that we have in mind wanted to make sure that our all purpose database client, DBeaver, is able to communicate with an Oracle Database.   Preparation Oracle Java Version Objective The version of JDBC Client that we need will be based on the version of … Continue reading DBeaver – Database Connection Configuration – Oracle – Oracle JDBC Driver