I’m trying to create a DDL trigger AFTER CREATE which would make another trigger when called. So I wrote some test code, here it is: CREATE OR REPLACE TRIGGER Test_Trigger AFTER CREATE ON SCHEMA …
Tag: plsql
how to use select into to insert many records
i have a stored procedure that will copy data from table A to table B and return id that is generated from table B to update table a record . this is sample data table A is : id—-Name—refId—…
How can I ‘flatten’ a one to many table with URLs so that each additional URL shows up in a new column?
I’m trying to ‘flatten’ a one to many relationship using SQL to create a CSV of points and their associated photos to use with a web map. Table 1 is a list of points and their locations, and Table 2 …
My PLSQL trigger is not looping through the table
I have a group project and we are using PLSQL to make a shopping cart application. We are creating a trigger in order to cancel a shopping cart and return all of the items back to stock. As it is now, …
Relational Operators Issue With Null
I am having issues with the below select statement not picking up the data when I insert a relational operator. SELECT C.FIRST_NAME, C.LAST_NAME, B.COMPANY,A.ITEMNO, A.REV, A.DESCRIP FROM ARINVT A …
How can I insert values from a nested table into another table?
I want to grab values from a nested table in one table and insert said values into another table Here’s the type for the nested table: The nested table: Here’s the table that contains the nested table: Here’s the table into which I want to insert What I want to do is I want to grab the values from prod_an
how to split words in oracle
Problem: text is shown without line break or chr(10); suppose test column_name (text) hello world hello world hello world hello world. hello world. sql i tried select REPLACE(…
How to group two table with the same columns doing total of a column value
I have two oracle table with the same columns I want to create a query over those two tables doing total by a column : Table 1 : PRODUCTION_SYSTEM_ID CARD_TYPE TOTAL DATE_CREATION ———–…
Conditional ROW_NUMBER() to skip nulls still counting them
I am trying to add a ROW_NUMBER column to a data set that follows the order of [Withdrawal then Fee; Withdrawal then Fee] based upon whether the column NETWORKCD is null. However, my row_number formula is still counting Nulls even though it’s not displaying the numbers, like so: I am using the following formula for PeriodCount I was expecting PeriodCount
Bad bind variable error in store procedure – PL/SQL – Oracle
CREATE OR REPLACE PROCEDURE demoStoreProc ( stringNums IN VARCHAR2 ) AS stepCount NUMBER; BEGIN SELECT REGEXP_COUNT (stringNums ,’,’)+1 INTO :stepCount FROM “SYS”.”DUAL” ; END So in the …