SQL$HELP72.HLB  —  ACCEPT  Examples
    Example 1: Prompting Based on the PROMPT and NOPROMPT Clauses

    SQL> DECLARE :x INTEGER;
    SQL> DECLARE :y INTEGER;
    SQL>
    SQL> ACCEPT :x indicator :y PROMPT 'what value? ';
    what value? 10
    SQL> PRINT :x, :y;
               X             Y
              10             0
    SQL>
    SQL> ACCEPT :x INDICATOR :y NOPROMPT;
    11
    SQL> PRINT :x, :y;
               X             Y
              11             0
    SQL>
    SQL> ACCEPT :x;
    Enter value for X: 12
    SQL> PRINT :x;
               X
              12
    SQL>

    Example 2: Using ACCEPT to Prompt for SET FLAGS String

    This sequence would be included in a script.

    SQL> DECLARE :debug_flags CHAR(20);
    SQL> ACCEPT :debug_flags;
    Enter value for DEBUG_FLAGS: trace
    SQL> PRINT :debug_flags;
     DEBUG_FLAGS
     trace
    SQL> SET FLAGS :debug_flags;
    SQL> SHOW FLAGS

    Alias RDB$DBHANDLE:
    Flags currently set for Oracle Rdb:
       PREFIX,TRACE,MAX_RECURSION(100)
Close Help