Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

query not running

Posted on 2014-04-04
5
Medium Priority
?
386 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 2000 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
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.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to recover a database from a user managed backup

715 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