Remove duplicates from a string separated by colon or by any keyword
select distinct str from (
select regexp_substr('abc:xyz:abc:pqr:xyz','[^:]+',1,level) str from dual
connect by level <= regexp_count('abc:xyz:abc:pqr:xyz','[^:]+', 1)
);
Remove duplicates from a string separated by colon or by any keyword
This is the easiest way of getting data of particular month
Select * from table where extract(MONTH from column_name ) = 4; -- April
Column_name should be of date type or timestamp.
FIRST_LETTERS
-------------
KSM
CREATE USER c##test_user IDENTIFIED BY password1; -- CONTAINER=ALL;
ALTER SESSION SET CONTAINER = pdb1; CREATE USER test_user IDENTIFIED BY password1; -- CONTAINER=CURRENT;
analyze at
headquarters. Now, all regional sites can use the same procedure to query their
own sales tables.analyze to calculate sales commissions and update a central payroll table.analyze should
not have direct access to the payroll table,
which stores employee salaries and other sensitive data. The solution is to
have procedure analyze call
definer-rights procedure calc_comm,
which in turn updates the payroll table.MAX returns maximum value of expr. You can use it as an aggregate or analytic function.SELECT A.x + A.y AS z
FROM A
WHERE z = 10 -- z is not available here!
z, you have two options. Either repeat the expression:SELECT A.x + A.y AS z
FROM A
WHERE (A.x + A.y) = 10