Linker IT Software
Order Home
menubar-top-links menubar-top-rechts

SQL*XL: Database to Excel bridge

Related LIT software: litLIB: Excel power functions pack encOffice: Protect your Excel file easy and safe

Home Products SQL*XL Help Commands

Buy now

Download now

SQL*XL online help

SQL*XL: Accept command

Accept command


ACCEPT variable [PROMPT text ];

The accept command can be used to prompt for a value for a substitution variable. When no prompt is supplied it will display a message to enter a value for variable. If the variable already exists the old value will be shown so the user can change it.

Display a message to enter an employee number before getting the data for that employee:

ACCEPT myempno PROMPT 'Enter an employee number';
select * from emp where empno = &myempno;

Display a message to enter a department number before getting the department data. The value for department should be preset to 20, the user can change it at the prompt:

DEFINE mydeptno = 20;
ACCEPT mydeptno PROMPT 'Enter the department number';
select * from dept where deptno = &mydeptno;

See also:

SQL*XL ribbon in Excel