last modified by Yanis Kregers at 11:44pm 01-02-2002 

**********  SQL text perprocessor v0.8 *************

directives 

1.define
2.input
3.connect
4.disconnect
5.trn

all directives are case insensitive and started with #

1.DEFINE
========

syntax:

#define VAR VAL - Initialize variable VAR with value VAL
#define VAR - remove variable VAR

special variables

DATE - local Date
TIME - local Time
NOW - local DateTime

all variable names are case insensitive

$(VAR) - value of variable VAR

example:

#define TBL Billing;
#define FLD Log;
select $(FLD) from $(TBL);

will be executed as "select Log from Billing"

2.INPUT

syntax:

#input VAR [options] [prompt]

options:

NEW - clear variable VAR value and prompt
UNDEF - prompt if variable VAR not defined
if options not defined then prompted allways

[prompt]:
prompt string, if not defined then prompted as "input variable VAR value"

3.CONNECT

syntax:

#connect database [ user [psw] ]

database: database to connect

f:\pvsw\demodata - connect to f:\pvsw\demodata
@demodata - connect to named database demodata
[demodata] - connect do database using bdbd alias demodata

user : user name 

password : psw

4.DISCONNECT

syntax:

#disconnect

close current session if no more datasets are active

5.TRN

syntax:

#trn action
action:
  start  - starting transaction for current session
  commit - commit transaction for current transaction
  rollback,
  abort  - rollback work for current transaction

P.S. Enjoy more .....