Solved

query not running

Posted on 2014-04-04
5
384 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 74

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 74

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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many‚Ķ
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

623 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