Oracle select rows where varchar is convertible to number
I have a table with a VARCHAR column which happen to contain numbers.
SQL create table from Oracle all_tab_cols
SELECT ‘CREATE TABLE ‘ || table_name || ‘ (‘ ||
LISTAGG(column_name || ‘ ‘ || data_type ||
CASE
WHEN data_type IN (‘VARCHAR2’, ‘CHAR’) THEN ‘(‘ || data_length || ‘)’
WHEN data_type = ‘NUMBER’ AND data_precision IS NOT NULL AND data_scale IS NOT NULL THEN ‘(‘ || data_precision || ‘,’ || data_scale || ‘)’
WHEN data_type = ‘NUMBER’ AND data_precision IS NOT NULL THEN ‘(‘ || data_precision || ‘)’
ELSE ”
END, ‘, ‘) WITHIN GROUP (ORDER BY column_id) || ‘);’ AS create_table_statement
FROM all_tab_cols
WHERE table_name = ‘MY_TABLE_NAME’
GROUP BY table_name;
“File Not Found” Error Oracle BI Publisher
I got an error when I was creating an excel template with oracle bi publisher. How to fix it?
Queries consuming high Sharable Memory in AWR
I have faced some performance issue at the database and while investigating I’v noticed the below dynamic sampling queries. Note that the dynamic sampling parameter is 2, and the table statistics is up to date.
Taking on consideration the queries doesn’t include a dynamic sampling hint and I have searched in the AWR for such hint which I couldn’t find.
Simplest way to declare a variable that can store multiple rows from “select” and have 2 columns?
In my stored procedure, I want to have a variable, that can store multiple rows from select query result.
How to make oracle cross table query for date column
I have table department_statistics with the following structure and sample data :
Ora DB 19c on windows, cannot logon on EM
Installed Oracle 19c on windows. Install successful.
Oracle: How to capture forall save exceptions using while loop method
In oracle,Usually when we use forall save exceptions to capture error occurring records through bulk load, we will use for loop to iterate the SQL%bulk exceptions and capture the error records..there is a requirement to use while loop instead of for loop in exception block to capture SQL%bulk exceptions. Please could someone post working code on how to use while loop for capturing SQL%bulk exceptions?
slice amount into ranges according to ranges from table
anyway to slice amount into ranges according to ranges from table as below
How can I change the select to get all data in one block of rows?
I want to get employees information’s and Head of department name and custody officer
I did this query :