Solved

query not running

Posted on 2014-04-04
5
377 Views
Last Modified: 2014-04-06
Why this query is not working....?

SQL> SELECT * FROM
(
select
    SEGMENT_NAME,
    SEGMENT_TYPE,
    BYTES/1024/1024/1024 GB,
    TABLESPACE_NAME
from
    dba_segments
order by 3 desc
) WHERE
ROWNUM <= 10
/
 14
SQL>
0
Comment
Question by:tonydba
  • 2
  • 2
5 Comments
 
LVL 73

Expert Comment

by:sdstuber
ID: 39978866
what's not working about it?


it runs fine for me
0
 

Author Comment

by:tonydba
ID: 39978938
The output looks like this..

 SELECT * FROM
(
select
    SEGMENT_NAME,
    SEGMENT_TYPE,
    BYTES/1024/1024/1024 GB,
    TABLESPACE_NAME
from
    dba_segments
order by 3 desc
) WHERE
ROWNUM <= 10
  2    3    4    5    6    7    8    9   10   11   12   13
SQL>
0
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
ID: 39978954
put a semicolon at the end of it



SELECT *
  FROM (  SELECT segment_name,
                 segment_type,
                 bytes / 1024 / 1024 / 1024 gb,
                 tablespace_name
            FROM dba_segments
        ORDER BY 3 DESC)
 WHERE ROWNUM <= 10;
0
 
LVL 15

Expert Comment

by:Devinder Singh Virdi
ID: 39979029
If you copy and paste few sql statements with multiple lines, SQL Plus may display line number inappropriately. If you just type "L" in Sqlplus, you will see all statement with their corrosponding line number.
0
 

Author Closing Comment

by:tonydba
ID: 39981521
Thank you for your effort.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Via a live example, show how to take different types of Oracle backups using RMAN.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now