Wednesday, July 20, 2005

From the Edge: Using the New "TOP n" Qualifier in SELECT Commands
Section: New and Enhanced Commands      
Chapter: Running R:BASE Your Way!
Platforms: R:BASE 7.5, V-8 "Turbo", Oterro 3.5/8.0
Supported Builds:
. R:BASE 7.5 (7.5.11.30720 or higher)
. R:BASE V-8 "Turbo" (8.0.9.30720 or higher)
. Oterro 3.5 and Oterro 8.0 (Private Beta)

Among major tools, features and enhancements, R:BASE 7.5 for
Windows, R:BASE  V-8 "Turbo" for Windows, Oterro 3.5 and Oterro
8.0, include the support for new "TOP n" qualifier in SELECT
commands.

New Syntax:

SELECT TOP n * FROM tablename WHERE whereclause ORDER BY column(s)

Here is an example:

To show the top 5 bonuses where the bonus is under $500 from
SalesBonus table in ConComp:

SELECT TOP 5 * FROM SalesBonus WHERE Bonus < 500 ORDER BY Bonus=DESC

The "TOP n" goes between the word SELECT and the column list for the
command.

A PDF version of this document is also available at:

From The Edge: http://www.razzak.com/fte
(Powered by R:WEB Suite)

Imagine the possibilities!

Very Best R:egards,

Razzak.

Reply via email to