Skip to content

Tag: oracle

Select list as column in Oracle SQL

I would like to append a few rows to an already existing table (15 rows to be precise). What is the quickest way to do this? This works, but it seems redundant. I was wondering if there’s a solution along the lines of: Please note that I want to preserve the leading zeros for each element in my list. Th…

Oracle select same id where 2 exist

so this query of this Oracle table shows 2 rows with same id all good — but there are other ids that have more than 1 entry as well so this query: works but brings back 2 different ids that both have more than 1 entry I don’t care which id I get. I just want both of the ids

Best way to insert into multiple tables in a cluster

Suppose I have a wide table (CUSTOMERS) that contains lots of columns (CUSTOMER_ID, FIRST_NAME, LAST_NAME, DOB, ADDRESS, PHONE_NUMBER, etc). This table is used in several full table scans, each of which selects only a small number of the columns of the table. Since this table is very large, these full table s…

Passing Multiple Values To PL/SQL Input

I have an Oracle package which contains a function. This function has 3 inputs. I need to pass multiple values to each input. I could automate a process which runs it multiple times with each combination of variables but I would like to only make one call to the database. Simplified Code Answer Pass it with q…

Oracle 12c updating multiple rows with the same data

I’m trying to write a script that pulls out all of the distinct ‘words’ in a string and saves them in another field. I’ve gotten the process to work in Oracle 19c (though any advice is welcome) but when I run the script in 12c the first record is correct but all the following records h…