I want to connect a Node Express API with an Oracle 11g Database which has a table with a BLOB column. I want to read it using a SQL query, but the problem is that the BLOB column can have a very long …
Tag: oracle
How do i resolve this trigger in pl/sql?
I want to have a trigger that no more than 3 employees work on a given project this is the code that i have but doesn’t work very well, sometimes work and sometimes doesn’t work. create or replace …
Getting the result of sum / count with two different conditions
I’ve been trying to extract to average times (based on some criteria). I need to get two results. These two results are based on how many minutes between two times, divided by the quantity of …
Calling a Procedure with name of Table as argument and assigning same datatype to variables as in Table in PL / SQL
following is the code. What I am doing here is passing the table_name as argument (I don’t know how to pass it, I just searched it on stackoverflow and other websites, and came up with this solution. Apparently it is a way to pass the table dynamically however, I don’t know the logic behind) to a …
Using a DBMS_PIPE.PACK_MESSAGE and DBMS_PIPE.SEND_MESSAGE in a trigger
Env: Oracle 12c I’m looking at using Oracle DBMS_PIPE within a table trigger that will be used by many users. The trigger will fire only on a STATUS update as per below: The following call will be initiated from an Oracle APEX page process where this can be submitted again by multiple users. My question…
Compare dates between two dates at specific positions
Given the following sample records within the table: MY_DATES, using Oracle SQL and/or PL/SQL, I need to always take the first DATE_REGISTERED in this table, i.e. 26/10/2019 and then advance to the third DATE_REGISTERED record/value, i.e. 2/02/2020 and check if the difference is greater than 13 weeks, between…
Oracle how to truncate a decimal to 1 significant digit?
I would like to round decimal numbers down to the first significant digit. Since they will all have a varying number of leading zero decimals, i searched this site and found the following expression. …
How to returns number of rows incrementally based on column values
I have departments and issues tables. For every department there are approval levels. So if say HR department has 3 approval levels, i want the drop down to return a new alias column as Y1,Y2,Y3. Similarly if finance has 2 it should return Y1 and Y2. Is it possible in sql? As of now the first alias column is …
Combining some of the rows and sum them up in oracle sql
I`m working on some data manipulation and have table: I need to have and output to look like: Please suggest what can I use to combine and sum up those. I appreciate any input! Thank you Answer You can use aggregation. Values are strings, so you probably want to concatenate them rather than sum them (which ma…
How to create a Procedure with specific SQL Select Output in Oracle?
I use an Oracle database and currently I have a problem by creating a Procdure which should create some SQL SELECT Outputs. The procedure was successfully completed but I get no output. It is necessary the work with some temporary variables and another cursor? And it is possible to complement the SQL SELECT S…