Blog - Our findings and learning
OLAP vs OLTP vs Datawarehouse Database
There is nothing about the database itself that “makes” it an OLAP, or a DW, or an OLTP.That is all a matter of how it is used. Kind of like
DBMS_UTILITY.FORMAT_ERROR_BACKTRACE in PLSQL
In Big/complex applications, it is essential to call Sub-programs (Procedures/Functions) from other sub-programs. In that case it will be difficult to trace out Errors/Exceptions from where it is raised i.e.
Histograms in Oracle for Table Columns
Histogram:A histogram is a special type of column statistic that provides more detailed information about the data distribution in a table column. Purpose of Histograms:By default the optimizer assumes a
ORA-30926: unable to get a stable set of rows in the source tables
We will get this when we are trying to update a row in a table, for which there will be two or more corresponding records. Table 1: tc11 tcl2 t1
ORA-06502: PL/SQL: numeric or value error
We may get this error, when we try to assign a value to a variable which is bigger than the maximum size of the variable.Find the following code for example:
Finding characters in a string (VARCHAR-VARCHAR2) column
Compile the following Function in Oracle Database by copying it and Pressing F5 or F9 create or replace function test_num (v_card varchar2) return varchar2 is v_num number; begin select v_card
Toad and SQL Developer shortcuts for Database Developers
S.No. Shortcut Functionality Toad SQL Developer 1 Ctrl + Enter Ctrl + Enter Executing Query or selected script (multiple queries execution is not available in Toad) 2 F9 F9 Executing
Function to display reverse string of the given string in PL/SQL
CREATE OR REPLACE FUNCTION rev_str_f(str VARCHAR2) RETURN VARCHAR2ISv_str VARCHAR2(10); –you can specify your own sizev_str_rev VARCHAR2(10); –specify same size as v_strBEGINv_str := ‘&string’;DBMS_OUTPUT.PUT_LINE(‘Given String: ‘||v_str);FOR i IN 1..LENGTH(v_str) LOOPv_str_rev :=
Difference between REPLACE and TRANSLATE in SQL?
Replace will replace the character or string with the given character/string for every occurrence of the character/string.Translate will replace the character with another character given not by the string/multiple characters