Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 51519

All versions of Oracle database. Add a version-specific tag like oracle-11g-r2 if that context is important in the question. Do not use for Oracle products such as applications or middleware or other database products owned by Oracle, like MySQL or BerkeleyDB.

2 votes

Can I use a Synonym to point to an object in a schema using another schema?

Yes, of course. You just need to create synonym in S1 schema (not public synonym).
Dmitriy's user avatar
  • 293
1 vote
Accepted

Split column into 2 column oracle

It is quite simple: select AIN, max(ACCEPT_TYPE) keep (dense_rank first order by date1) ACCEPT_TYPE_1, max(ACCEPT_TYPE) keep (dense_rank first order by date1 desc) ACCEPT_TYPE_2, …
Dmitriy's user avatar
  • 293
0 votes
Accepted

SQL select with unique_list - losing an item

There are two ways: first - using regexp_replace like here - Eliminate duplicates in ListAgg (Oracle), second - use distinct inside a subquery: select fk_proddes_id,fk_id_cod_deseu, listagg(to_char …
Dmitriy's user avatar
  • 293
1 vote

How to isolate single values from multiple records

Another one variant with lag (for the sqlfiddle from an a_horse_with_no_name's answer): select decode(lag(alpha_code, 1) over (partition by alpha_code order by beta_code), null, alpha_ …
Dmitriy's user avatar
  • 293
0 votes
Accepted

Oracle Nested Query with Group By and Having Clauses

If I understand correctly: select * from (SELECT D.DID, AVG(F.DIST) as AvgDist from Destinations D join Flights F ON F.DID = D.DID GROUP BY D.DID) avgdist join ( …
Dmitriy's user avatar
  • 293
1 vote
Accepted

How to design a query that gives count of different parameters based on different condition ...

select sum(case when issue_date = return_date then 1 else 0 end) SAME_DAY, sum(case when return_date is null then 1 else 0 end) NOT_RET, sum(case when issue_date <> return_date then 1 el …
Dmitriy's user avatar
  • 293
1 vote

Allowing users to compile / run PLSQL and SQL

I think there is no problem, but you need to take care about data. For example, you can grant them privileges to create tables and procedures for their needs in theirs schemas, and privileges to selec …
Dmitriy's user avatar
  • 293
1 vote
Accepted

oracle database - sql for counting the columns with the same id with the one in current row

select rap.DENUMIRE,a3.ID, op.FK_ID, count(*) over (partition by op.FK_ID) AS count from ANEXA3_TABEL1_ROWS a3 inner join RAPORTORI_AMB rap on rap.id = ch.FK_ID_RAPORTOR inner join ANEXA3_TABEL1_O …
Dmitriy's user avatar
  • 293
0 votes

How to raise_application_error beyond a when others clause

Maybe you need something like this? create or replace procedure p1 is begin select ... into ... from ... where ...; exception when no_data_found then ... raise_application_error(-20100, …
Dmitriy's user avatar
  • 293
2 votes

How to access apex data from sqlplus?

Table person is situated in schema assigned to your apex workspace. You can go to APEX IDE to the section SQL Workshop -> Object Browser, schema name will be displayed in the top right part of the pag …
Dmitriy's user avatar
  • 293