EXIT-SELECT

Function

Exits a SELECT paragraph immediately.

Syntax

EXIT-SELECT

Description

Jumps to the command immediately following END‑SELECT.

Use EXIT-SELECT when you need to end a query before all rows are retrieved.

Examples

begin-select
cust_num, co_name, contact, city, state, zip, employees
  add &employees to #tot_emps
  if #tot_emps >= 5000
    exit-select ! Have reached required total emps.
  end-if
  do print_company
from customers order by employees desc
end-select

See Also

BEGIN-SELECT