- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to get top 100 records?
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
тАО07-22-2003 11:53 AM
тАО07-22-2003 11:53 AM
How to get top 100 records?
I noticed there is no "TOP" or "ROWCOUNT".
Thanks!
Haji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2003 12:23 PM
тАО07-22-2003 12:23 PM
Re: How to get top 100 records?
Not particulary Allbase,
but may be something from Informix or DB2 works... http://php.weblogs.com/portable_sql
Programmed found here ... http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20563735.html
Effective Code:
SELECT r.employee_id, r.name,
(SELECT COUNT(1) FROM employee WHERE employee_id <= r.employee_id) AS "RowNumber"
FROM employee r
ORDER BY r.employee_id ASC
But this could be an expensive statement for a big table.
Hope this helps
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2003 12:44 PM
тАО07-22-2003 12:44 PM
Re: How to get top 100 records?
I don't see "COUNT" as a SQL commond for Allbase.
Haji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2003 06:26 PM
тАО07-22-2003 06:26 PM
Re: How to get top 100 records?
Simply select your rows in descending order and set the where clause to where rownum < 100.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2003 05:40 AM
тАО07-23-2003 05:40 AM
Re: How to get top 100 records?
But there is no "ROWNUM" command in AllBase either.
Haji