I am trying to run below code which reads the index definition for table A so that it can be created again after I delete/create that in this script. This script runs fine when the returned value(ddl) …
Tag: plsql
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 …
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 procedure and then using
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 is, for each user here,
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 them, i.e. The end result for this exercise is to return distinct
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 Statments with an ORDER BY clause at
Case statement based on the time
I have the following table Based on the transaction_DT: if the transaction between 04:00:00 PM to 08:00:00 AM + next day get “After Hour” Between 08:00:00 AM to 04:00:00 PM within same day get “Working Hour” Using the case statement it is not works! Answer Hmmm . . . how about something like this: Your code doesn’t work because you
Calculate Week Numbers based on the initial given date to end date
I have below scenario that Business want to calculate Week Number based on Given Start Date to End Date. For Ex: Start Date = 8/24/2020 End Date = 12/31/2020 ( These Start date & end date are not constant they may change from year to year ) Expected Output below: I need Oracle Query to calculate Week Number(s) like above
limit column char trigger plsql
I’m starting to learn PLSQL and created a very very simple table, I’m trying to get familiar with functions and triggers. My table: Now to the question, I want to limit before insert or update new row (biuefer) so that the first name must be 8 characters, not less, not more. If you try to insert a row with a
How to create an Oracle Procedure which includes a Subquery for an SQL Insert Into clause?
I have a problem to declare an Database Procedure, which includes an SQL Insert Into Statement with a subquery. I use an Oracle database. I get an errormessage, that tells me the From keyword was not found where expected (ORA-00923). Could somebody explain me, how I create this syntax error in the following example ? Is there a problem with