Category "plsql"

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

Oracle/PLSQL performance tips

I living problem in my query. When i add ROUND and DECODE query takes too long time but when i delete directly return value. When i search for sql advice no any

how to export output in a CSV format through a procedure

How to export output in a CSV format through a procedure. My output is stored in v_output variable Please find below query Declare view_name VARCH

PL/SQL: Statement ignored in trigger

I am really confused with PLSQL error messages The following errors are returned: Error at line 13: PL/SQL: Statement ignored 1. create or replace TRIGGER tr

PL/SQL - I want to test if a character string contains 1 or more lower-case letters

Using PL/SQL (Oracle 11gR2) I want an IF statement that tests if a string contains 1 or more lower-case letters. PL/SQL pseudo-code: declare v_string varchar2

Use dbms_output.put_line in Datagrip for .sql files

I started to use Datagrip for my PL/SQL (school) projects that need the use of DBMS_OUTPUT.PUT_LINE. Before this I was using Oracle SQL developer and I was able

using cursor attributes in a CURSOR FOR LOOP

I am running the following in the Scott schema: SET serveroutput ON; BEGIN FOR c_Emp IN (SELECT * FROM emp) LOOP dbms_output.put_line('The record processed by

Invalid Json from Oracle Apex

I have a problem with returning a json object from a REST method in Oracle Apex. Apex puts an escape character in front of every quotation mark and hence the js

SQL error "ORA-01722: invalid number"

A very easy one for someone, The following insert is giving me the ORA-01722: invalid number why? INSERT INTO CUSTOMER VALUES (1,'MALADY','Claire','27 S

How to pass multiple values into one parameter in stored procedure (Oracle)

I have a parameter created for a stored procedure looking to allow user to pass in multiple inputs. create procedure sp1 (p1 in varchar2) as begin select proc

Dynamic Column Name for a Derived Column - ORACLE SQL

I'm trying to set a dynamic column name on my query using "select from dual". Is this possible? If not, kindly recommend alternatives for me to achieve this. I

PL/SQL print out ref cursor returned by a stored procedure

How can I fetch from a ref cursor that is returned from a stored procedure (OUT variable) and print the resulting rows to STDOUT in SQL*PLUS? ORACLE stored pro

PLS-00103 error for procedure

I have 2 servers (one for testing, one for production), both have the following Oracle packages (identical output on both of them for SELECT * FROM V$VERSION; :

How to Dynamically Name Table in Oracle SQL Select Statement?

i would like to return all rows and fields from a table, where neither the tablename nor the fieldnames are known in advance. Something like: select * from [TA

How to convert the Long value to String using sql

I am doing a long to string conversion using java in following way. Long longValue = 367L; String str = Long.toString(longValue, 36).toUpperCase(); this is r