I’m learning SQL on Oracle Dev Gym. I’m taking the class Databases for Developers: Next Level: Merge, by Chris Saxon. I can’t for the life of me figure out how to delete rows with filter in the …
Tag: oracle
Recursive Query Sql Oracle 3 months difference between dates
I have a simply table with three columns, policy_no, casenumber and created_date. Multiple casenumbers can be logged against unique policy numbers. I need a query that runs through the data finds the …
oracle sql question on aggregation of transaction data
I am trying to add everything in te data (dollar_value_us, QUANTITY) but not add shipping total since each transaction number has multiple items but the customer only paid shipping once. I am using …
oracle trigger and json_value
Hi I want to store some values from :new.payload via an trigger. this works in sql-developer but not in a trigger… select json_value(‘{“timestamp”:”2019-05-09T14:00:00Z”,”value”:0,”unit”:”W/m²”}’, …
SQL query to interpolate between values
I intend to interpolate (linear interpolation) between values in a column and insert that into a new column using a SQL query. Based on my search online, I suspect LEAD analytic function could be useful. I am new to writing SQL queries. So, any insights on how it can be achieved will be quite helpful. The sam…
How to create a query to get the multiple row data in comma separated format in one row in Oracle
I have a requirement where I have column ‘NOTECODE’ in database table POLICY which contains multiple Note Codes in comma separated format. Ex: CC,TD,HL POLICY : POLICYNO | NOTECODE ———-|—-…
Oracle/SQL: Regexp Similar to LIKE-% but wildcard mandatory (not optional)
I’m in Oracle 10, and need an equivalent of where col like ‘str%’ but where the %-part is not optional. The result of str is not allowed. Is the following correct? WHERE REGEXP_LIKE (col, ‘^str(*)…
Missing keyword from CREATE VIEW
The question for the section is: Create a view called TITLE_UNAVAIL to show the movie titles and media_id of the media not returned yet. The view should not allow any DML operations. This is for …
Insert from multiple tables, multiple rows
I have been trying to solve my problem but could not find the answer. Oracle db. I have table context with looks like: | contextId | customer | ———————- | 1 | John | | …
Create new rows based on condition – Oracle SQL
I have a table ID ID2 VARIABLE VA_VAL 1 100 F_NAME ABC 1 102 QUAL 01 1 103 CODE 1923 2 100 F_NAME BCD 2 102 QUAL 02 2 103 CODE 2034 3 100 F_NAME CDE 3 …