SQLTeX documentation - Process your SQLTEX file

SQLTeX documentation - Process your SQLTEX file

Inhoudsopgave
SQLTeX documentation
Installing SQLTeX
Write your SQLTEX file
Process your SQLTEX file
SQLTEX errors and warnings
Alle pagina's

Process your SQLTEX file

To process you SQLTEX file and create a LATEX file with all information read from the database, call SQLTEX with the parameter(s) and (optional) commandline options as described here:

 


Parameters

SQLTEX accepts more than one parameter. The first parameter is required; this should be the input file, pointing to your LATEX document containing the SQLTEX commands.

By default, SQLTEX looks for a file with extension `.tex'.



All other parameters are used by the queries, if required. If an SQL query contains the string $PARn, it is replaced by that parameter.

 


Command line options

SQLTEX accepts the followint command- line options:

 

-E string
replace input file extension in outputfile: input.tex will be input.string
For further notes, see option -e below
-N
NULL return values allowed. By default SQLTEX exits if a query returns an empty set.
-P
prompt for database password. This overwrites the password in the input file.
-U user
database username. This overwrites the username in the input file.
-V
print version number and exit.
-e string
add string to the output filename: input.tex will be inputstring.tex. This overwrites the configuration setting $main::stx
In string, the values between curly braces {} will be substituted:
Pn
parameter n
M
current monthname (Mon)
W
current weekday (Wdy)
D
current date (yyyymmdd)
DT
current date and time (yyyymmddhhmmss)
T
current time (hhmmss)
e.g., the command `SQLTeX -e _{P1}_{W} my_file code' will read `my_file.tex' and write `myfile_code_Tue.tex' The same command, but with option -E would create the outputfile myfile._code_Tuesday By default (without -e or -E) the outputfile myfile_stx.tex would have been written. The options -E and -e cannot be used together or with -o.
-f
force overwrite of existing files. By default, SQLTEX exists with a warning message it the outputfile already exists.
-h
print this help message and exit.
-o file
specify an output file. Cannot be used with -e or -E.
-p prefix
prefix used in the SQLTEX file. Default is sql. This overwrites the configurarion setting $main::cms_prefix.
-q
run in quiet mode.
-r replace
Specify a file that contains the replace characters. This is a list with two TAB- seperated fields per lione. The first field holds a string that will be replaced in the SQL output
-rn
Do not use a replace file. -rn and -r file are handled on the same order in which they appear on the commandline and overwrite each other.
-s server
SQL server to connect to. Default is localhost.