Variables in the SQL statements

You can use a few variables in the SQL statements that Aiolos substitutes before it sends the statements to the database. The syntax for such a variable is %VARIABLE-NAME%

The following variables are known by Aiolos:

STATEMENT

Description

%FIRSTTIME%

Time of the first hour in the export

%LASTTIME%

Time of the last hour in the export

%ID%

ID of the series. This is taken from the text box of the load parameter. (ExpNamesLast)

%VAL%

Value to export, this is of course different for each hour. Formatted according to the ValueFormat tag

%TIME%

Start time of the current exported value'e time period.

%TOTIME%

End time of the current exported value's time period.

%RESOLUTION%

Time resolution for the current exported value.

%MINFROMMIDNIGHT%

Contains the number of minutes from midnight, this is intended for timestamp purposes.

%SECFROMMIDNIGHT%

Contains the number of seconds from midnight, this is intended for timestamp purposes.

%HOUR24HHZERO%

Hour with two digits to be exported. First hour is 00 last is 23.

%HOUR24HHONE%

Hour with two digits to be exported. First hour is 01 last is 24.

%HOUR24HZERO%

Hour with one or two digits to be exported. First hour is 00 last is 23.

%HOUR24HONE%

Hour with two digits to be exported. First hour is 1 last is 24.

%KRAFTDYGN%

Date to be used together with HOUR24xxxxx variables.

%EXPORTTIME%

Date and time for when the export is run

%ORGVAL%

Unadjusted value for load

%RELKORR%

Relative correction for load value. %VAL% = %RELKORR% * %ORGVAL%

%ABSKORR%

Adjustment of load value in absolute numbers. %VAL% = %ABSKORR% + %ORGVAL%. If both %RELKORR% and %ABSKORR% exists the calculation will be; %VAL% = %ABSKORR% + %RELKORR%*%ORGVAL%

%TOTABSKORR%

Total correction in absolute numbers, calculated as; %TOTABSKORR% = %ABSKORR% + (%RELKORR-1)*%VAL%

%RUNMODE%

The mode of the export is either manual mode or automatic mode. If the export is run by the client the mode is manual.