Category "plsql"

Need to know if SQL Oracle can output a certain hierarchical style

Needing to know if this is possible. I'm trying to get a hierarchical output looking like this: TITLE|CHART|FUND|ORGN|PROGRAM S |S |null|null| S |S

Getting error when trying to run SQL statement in a oracle function

create or replace function auditif return number as l_filter_count NUMBER; begin EXECUTE IMMEDIATE 'EXPLAIN PLAN FOR ' || SYS_CONTEXT('USERENV','CURRENT_SQL')

arrays in pl sql | varray | associative

I'm planning to write a pl sql pseudo code procedure a gets all records from emp and is passed to procedure b procedure b getting called inside from a , is tra

Oracle db - remove ,, from email address

I'm running below code and getting below results but I want to remove ,, and after ,, texts from email address and that email address should show in UPPER(PT_PA

Mapping from source to target Very Slow: ODI 12c

Problem : I have a view which was significantly slower earlier(fetching 50 records took 25sec) Made some code changes and performance increased by a lot( 50 re

Unique constraint violated message on inserting code below

I am writing this code which throws an error in primary key: DECLARE CURSOR A1 AS SELECT TRANS_DET_ID, (SELECT MAX (NVL(TRANS_DET_DET_ID, 0

Check if a column is all NULL in PL/SQL

I want to write a programm that first checks if a column is only populated with NULLs before updating the column. I have written what I thought should work, how

Making some changes to a function in Oracle

I have a function which is not working as expected. How can I modify to get the desired output? CREATE OR REPLACE FUNCTION f_get_all_programs_test( pidm in num

Iterate over table of objects in Oracle

How should I iterate over a table of objects like this? CREATE TYPE SOME_OBJECT AS OBJECT ( ATTR1 VARCHAR2(20) , ATTR2 VARCHAR2(30) ); / CREATE TYPE C_SOME_

Export query result to csv in oracle stored procedure. The last column name is not getting printed

So i have a query that i would like to execute through a stored procedure and export the output of the query to a CSV file. But only the last column name is not

Can I check if table or column exists before altering it? [duplicate]

I'm working on some Oracle DB problem. Is there any possibility, to check if table or column exists, before I want to modify it? If it doesn'

Can I check if table or column exists before altering it? [duplicate]

I'm working on some Oracle DB problem. Is there any possibility, to check if table or column exists, before I want to modify it? If it doesn'

Display department names using Cursors.Create a PL/SQL block to display all the department names from the Department table using cursors

TABLE: Column name Data type Constraints DEPARTMENT_ID NUMBER(5) PK DEPARTMENT_NAME VARCHAR2(25) NOT NULL LOCATION_ID VARCHAR2(15) I have tried this. But stil

how to fix ORA-06575: Package or function is in an invalid state error

I'm looking to create a package, already have a working procedure. Working on a function, step by step and I have encountered an ORA-06575: Package or function

trigger in PL/SQL

There are two tables given: 1) employee(eno,ename,basic,da,gross) da=basic*(5.0/100) gross = basic+da 2) sal_hist(eno, sys_dt, old_basic) How to write a

How to hit a http URL from PL/SQL procedure?

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production I am creating an Oracle job where I need to hit a procedure for every 30 minutes,

PL SQL String Manipulation (Deconcatenate based on multiple delimiters)

I have string such as A~B~C,D~E,F~G~H,I. The string is comma separated and then each comma separated substring is ~ separated. There is no limit on the number o

ORA-01410 - Invalid ROWID while trying to UPDATE/DELETE in Oracle APEX

I'm currently creating an app in Oracle APEX and for some unknown to me reason while trying perform UPDATE/DELETE action by clicking on 'edit' button in the rep

ORA-22806 (not an object or REF) on Join to a view

Here is a fairly simple query that is throwing this error: SELECT RR.REQUEST_ID FROM CCS_REQUEST_RESPONSE RR INNER JOIN VW_STUDENT_CURRENT_AND_HIST VW ON RR.S

What exactly are IN, OUT, IN OUT parameters in PL/SQL

I've looked up questions here as well as looking online and watching videos but I'm still confused exactly what IN, OUT is. The reason I'm asking is because I'm