Oracle – Capture OS Command Output Using Oracle External Tables

Case for the OS side: Some things are best done on the OS side and there is no question about that. Case for the DB side: Some things are best done on the database side and there is no question about that either. What if? Some things need the output of one in the other … Continue reading Oracle – Capture OS Command Output Using Oracle External Tables

Oracle – Sync Any Sequence And Any Table Column In A Generic Fashion To Avoid ORA-00001

Table to Sequence relation Typically, you have tables that rely on a sequence for their PK. Almost all of the time the relationship between a table and its sequence is one-to-one. Often times, as releases are done with manual data inserts, not too much attention is paid to use the value from the sequence and … Continue reading Oracle – Sync Any Sequence And Any Table Column In A Generic Fashion To Avoid ORA-00001

Oracle – Compare Text Files With 10 Million Lines In 10 Minutes Using 10 Lines Of Code – EXTERNAL Tables

The goal of this post is to compare two text files that may have millions of lines and compare them to quickly find out which lines differ using Oracle EXTERNAL tables. As an Oracle professional, “external tables” are something you may already be familiar with or maybe you have heard about them but not used … Continue reading Oracle – Compare Text Files With 10 Million Lines In 10 Minutes Using 10 Lines Of Code – EXTERNAL Tables

Oracle – Capture PL/SQL Output From DBMS_OUTPUT.PUT_LINE To Table Or File

Debugging PL/SQL Code: Stepping through code is a basic necessity for programmers to test and verify logic flow in code. Very few PL/SQL programmers use this capability. Most, if not all, rely on the capabilities of the Oracle supplied package DBMS_OUPUT. Specifically, the PUT_LINE procedure within DBMS_OUTPUT is used as a crutch for debugging needs. … Continue reading Oracle – Capture PL/SQL Output From DBMS_OUTPUT.PUT_LINE To Table Or File

Oracle – Return SELECT Statement Results Like SQL Server SP’s – Using Pipelined Functions

Note: You can find a simpler version of this in my answer on StackOverflow. Returning SELECT statement results from procedures/functions? Everyone is familiar with Oracle functions that return basic data types (simple values with no internal components). Although rarely used, Oracle functions are however capable of returning more complex data types like cursors, arrays and … Continue reading Oracle – Return SELECT Statement Results Like SQL Server SP’s – Using Pipelined Functions