When I create a table with SQL Developer my columns and the name of the table must be capitalized. I want to use lower case but I don’t know how to do it. Answer This is not something that SQL Developer does; it is done by the Oracle database and is the default behaviour. From Oracle’s Database Object Names and
Tag: oracle
Oracle SQL null row order
I have the below table: Name (null) Name1 Name2 Name3 (null) Name4 I would like to generate this output: Name Output (null) Anon1 Name1 Name1 Name2 Name2 Name3 Name3 (null) Anon2 Name4 Name4 With the below query, I’m able to generate the below table Name Output Name1 Name1 Name2 Name2 Name3 Name3 Name4 Name4 (null) Anon1 (null) Anon2 However, the
Delete Rows which are fetched by a select query joining several tables
I have written the following select: What I want to do: I want to delete the rows in reminder, which are fetched by the described select. What I tried: Result: 00907. 00000 – “missing right parenthesis” I wonder if i can basically delete these rows in this manner. I also tried ‘exists’ resulting in the same error. Any suggestions? Thanks
How to remove “not a GROUP BY expression” error from the statement?
The schema of the table is: Emp (Empno, Ename, Job, Mgr, Hiredate, Sal, Comm, Deptno) Question: Display the job, deptno and average salary of employees belonging to department 10 or 20 and their salary is more than 2000 and average salary is more than 2500. My Query: Error: ORA-00979: not a GROUP BY expression I cannot find what is wrong
Grouping the common values in Oracle
I have a table with sample values as below In this table, all the values in Col1 will have its supporting values in Col2. The values A1 and A2 are like master values and they will never appear in Col2. I need to make an output displaying this master values in a new column like below What would be the
problem with constraint order in create table in livesql
This gives error: This doesn’t: Why? Answer Each DBMS defined it’s syntax to write SQL. It only works if you obey their rules. It’s kind of obeying the law of a country while you are in it. You can’t ask why I should do that? You have to. Or choose any dbms you like. If your dbms tells you to
Oracle sql pivoting values separated by commas
I have the below input ID LOTYP PROID LOCKR XXXXX 06 01 Y XXXXX 06 02 X XXXXX 06 02 S XXXXX 06 01 R XXXXX 02 01 Y XXXXX 02 02 X XXXXX 02 02 S XXXXX 02 01 R YYYYY 06 01 Y YYYYY 06 02 X YYYYY 06 02 S YYYYY 06 01 R YYYYY 02 01
BOM Explosion with Blanks
I have a simple BOM table that contains a parent and a child column. Every row contains values. There are no blanks. To bring that table into a BI-Tool I need to add blank values for the parents, like …
Oracle several counts over partition
I have the below query which is outputting the below results: SELECT a, b, COUNT(1) count, round(RATIO_TO_REPORT(COUNT(1)) OVER() * 100, 2) perc FROM t1 WHERE condition1 GROUP …
SQL query to delete records when the difference between two dates is greater than a certain value
I would like to delete records when the difference between SYSDATE and a TIMESTAMP (6) field of my table is greater than 10 days. I have created the following query: but i get the following error: am i creating the query correctly? Answer am i creating the query correctly? No, you cannot refer to an alias in the SELECT clause