- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: why I can not assign an alias to a query in th...
Operating System - HP-UX
1752590
Members
4422
Online
108788
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2002 02:04 PM
тАО03-14-2002 02:04 PM
why I can not assign an alias to a query in the from clause?
Hi all,
I have a simple query like this
select deptno, avg(temp.max_sal)
from ( select deptno, max(sal) as max_sal
from emp
group by deptno) as temp
where temp.max_sal >=5000
When I execute this query, I got error message: ORA-00933: SQL command not properly ended.
Can anybody tell me why?
Jane
I have a simple query like this
select deptno, avg(temp.max_sal)
from ( select deptno, max(sal) as max_sal
from emp
group by deptno) as temp
where temp.max_sal >=5000
When I execute this query, I got error message: ORA-00933: SQL command not properly ended.
Can anybody tell me why?
Jane
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-15-2002 03:57 AM
тАО03-15-2002 03:57 AM
Re: why I can not assign an alias to a query in the from clause?
Jane,
You need to "group by deptno) temp", rather than "group by deptno) as temp"
You need to "group by deptno) temp", rather than "group by deptno) as temp"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-15-2002 04:05 AM
тАО03-15-2002 04:05 AM
Re: why I can not assign an alias to a query in the from clause?
Hi,
I'm not sure, but is this what you're trying to do ?
SQL> select deptno,"salary" from
(select deptno, max(sal) "salary" from emp group by deptno)
where "salary" >= 5000;
Hope it helps,
Tom Geudens
I'm not sure, but is this what you're trying to do ?
SQL> select deptno,"salary" from
(select deptno, max(sal) "salary" from emp group by deptno)
where "salary" >= 5000;
Hope it helps,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-15-2002 10:21 AM
тАО03-15-2002 10:21 AM
Re: why I can not assign an alias to a query in the from clause?
Thank you,
My query is now working!
Jane
My query is now working!
Jane
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP