I have some data in an Oracle table which is stored in an XML-format string (column response in table WS_LOG). I would like to extract data from each different node below
Tag: oracle
Oracle SQL – return the date record when there is no count result
I have the tables below and I need my query to bring me the amount of operations grouped by date. For the dates on which there will be no operations, I need to return the date anyway with the zero …
Update sequence in table – Oracle
I have a table: table1 u_a_id element_id my_seq line_num 1 HI01-01 1 30 1 HI01-02 1 30 1 HI01-01 1 31 1 …
Change WM_CONCAT function to LISTAGG
I used WM_CONCAT in my sql query. The database has been updated to version 12c and WM_CONCAT doesn`t work. Query had value: Select r.product_id, count (1) how_many, wm_concat (distinct r.number) …
Create stored procedure from set of SQL – Oracle
I have a set of SQL like and I would like to convert it to function or a stored procedure in an automated way: create table test as select * from test1; DELETE FROM test WHERE e_id LIKE ‘%00-01’;…
How to create a collection and insert values in a table with the collection?
Hey I am creating a database to store some information about a sport club, where I have trainers and athletes, but when I am trying to insert trainers(entrenadors) to the table that errors appears: …
Creating a trigger inside another trigger. ORA-00604: error occurred at recursive SQL level 1
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 …
Apply Sequence based on unique_id
I have a table: table1 unique_id col_id val_id 1 100 a 1 101 b 1 102 c 1 103 d 2 106 a 2 106 b 2 …
How to produce a running sequence in Oracle based on report column values
I have the following sample Oracle APEX report by where the Origin ID and Origin Name are retrieved from the origin_tab(id,origin_id,origin_name) Based on these two column values, I need to generate …
Remove character from dynamic string
I have a file with some junk values and i need to get rid of them while loading that file into a table. Giving here some example. File is semicolon separated, and last column has those junk values. …