Hi everyone first thanks for your time. I have this data Data: And I have to obtain the max values of everygroup, if there is one group that has two same max values like A 40 23/56/1982 A 40 31/4/…
Tag: oracle
how to check a date is in current financial year
I am trying to check a condition if given date is in current financial year i.e april to march. but not getting any idea how to do code select nvl(Count(1), 0)+1 from ASET where IPE=’O’ and irt in (…
How do I count and sum from different tables (SQL)
I am trying to write an SQL statement that does this: For each customer that has an order, I need to list the customer’s number, the number of orders that customer has, the total quantity of items on those orders and the total price for those items. I then to need sort the result by the customer number.…
Oracle – update data in first table with rows from second table
How to update ‘date_from’ (t1) using ‘modfied’ (t2) when it is like 20/07/20. So in this case in t1 id’s 1 and 2 are to be updated and id 3 stays. Table 1: id date_from ———————– 1 …
How to implement AFTER INSERT Trigger in Oracle PL/SQL?
I am trying to implement after insert trigger in PLSQL. The goal is to check if there are multiple (>1) rows having specific status for each client. If so I’d like to rise an exception and roll …
Replace blank value with a default value in SQL
i have the below query which return blank values for the column property_value : select target_name,target_type,property_name,property_value from oracle_properties where target_name like ‘DY01EPI%’ …
Oracle: Need to commit after CREATE OR REPLACE FORCE EDITIONABLE VIEW
Silly question, but I can’t remember how this works. Need to commit after a CREATE OR REPLACE FORCE EDITIONABLE VIEW command? Answer No, DDL statements automatically commit in Oracle
How update row with inner joins
I have this select statement where I found two rows, and I want to update a specific column: I have tried: How do I correctly construct the update query? SOLUTION: Answer Just put your query as a table: Here is a demo: DEMO
Invalid Number ORA-01722
I have problem in my query that I always get this kind of error ORA-01722: invalid number Whatever I try to doesn’t work. The query is here SELECT * FROM ( SELECT p….
SQL Query calculating two additional columns
I have a table which gets populated daily with database size. I need to modify the query where I can calculate daily growth and weekly growth. Current Output I would like to add two additional columns which would be Daily Growth (DB_SIZE sysdate – DB_SIZE (sysdate -1)) Weekly Growth (DB_SIZE sysdate …