# Script regular statements

Regular statements are typically used for manipulating data in one way or another. These statements may be written over any number of lines in the script and must always be terminated by a semicolon, ";".

All script keywords can be typed with any combination of lower case and upper case characters. Field and variable names used in the statements are however case sensitive.

Use the drop-down on each function to see a brief description and the syntax of each function. Click the function name in the syntax description for further details.

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Alias

The alias statement is used for setting an alias according to which a field will be renamed whenever it occurs in the script that follows.

[**Alias**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Alias.htm) fieldname as aliasname {,fieldname as aliasname}

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### AutoNumber

This statement creates a unique integer value for each distinct evaluated value in a field encountered during the script execution.

[**Autonumber**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Autonumber.htm) \*fieldlist

[Using namespace] ]

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Binary

The binary statement is used for loading the data from another QlikView document, including section access data.

[**Binary**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Binary.htm) [[path] filename]

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Comment field

Provides a way of displaying the field comments (metadata) from databases and spreadsheets. Field names not present in the document will be ignored. If multiple occurrences of a field name are found, the last value is used.

[**comment**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/comment.htm) \*fieldlist using mapname

[**comment**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/comment.htm) fieldname with comment

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Comment table

Provides a way of displaying the table comments (metadata) from databases or spreadsheets.

[**comment-table**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/comment-table.htm) tablelist using mapname

[**comment-table**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/comment-table.htm) tablename with comment

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Connect

The CONNECT statement is used to define QlikView access to a general database through the OLE DB/ODBC interface. For ODBC, the data source first needs to be specified using the ODBC administrator.

ODBC [CONNECT](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/CONNECT.htm) TO connect-string

OLEDB CONNECT TO connect-string

CUSTOM CONNECT TO connect-string

LIB CONNECT TO connection

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Directory

The Directory statement defines which directory to look in for data files in subsequent LOAD statements, until a new Directory statement is made.

[**Directory**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Directory.htm) [path]

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Disconnect

The Disconnect statement terminates the current ODBC/OLE DB/Custom connection. This statement is optional.

[**Disconnect**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Disconnect.htm)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### drop field

One or several QlikView fields can be dropped from the data model, and thus from memory, at any time during script execution, by means of a drop field statement. The "distinct" property of a table is removed after a drop field statement.

Information noteBoth drop field and drop fields are allowed forms with no difference in effect. If no table is specified, the field will be dropped from all tables where it occurs.

[**drop-field**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/drop-field.htm) fieldname [ , fieldname2 ...] [from tablename1 [ , tablename2 ...]]

drop fields fieldname [ , fieldname2 ...] [from tablename1 [ , tablename2 ...]]

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### drop table

One or several QlikView internal tables can be dropped from the data model, and thus from memory, at any time during script execution, by means of a drop table statement. Optionally, use the drop mapping table variant to drop mapping tables—those created with the Mapping prefix—before the end of script execution.

Information noteThe forms drop table and drop tables are both accepted.

[Drop \[mapping\] table](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/drop-table.htm) tablename [, tablename2 ...]

drop [mapping] tables[ tablename [, tablename2 ...]

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### drop variable

Use the Drop variable statement to drop a script variable during script execution.

Information note

Both drop variable and drop variables are allowed forms with no difference in effect.

[Drop variable](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Drop-Variable.htm) variablename [ , variablename2 ...]

Drop variables variablename [ , variablename2 ...]

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Execute

The Execute statement is used to run other programs while QlikView is loading data. For example, to make conversions that are necessary.

[**Execute**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Execute.htm) commandline

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Force

The force statement forces QlikView to interpret field values of subsequent LOAD and SELECT statements as written with only upper case letters, with only lower case letters, as always capitalized or as they appear (mixed). This statement makes it possible to associate field values from tables made according to different conventions.

[**Force**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Force.htm) ( capitalization | case upper | case lower | case mixed )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### LOAD

The LOAD statement loads fields from a file, from data defined in the script, from a previously loaded table, from a web page, from the result of a subsequent SELECT statement or by generating data automatically.

[**Load**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Load.htm) [ distinct ] \*fieldlist

[( from file [ format-spec ] |

from\_field fieldassource [format-spec]

inline data [ format-spec ] |

resident table-label |

autogenerate size )]

[ where criterion | while criterion ]

[ group\_by groupbyfieldlist ]

[order\_by orderbyfieldlist ]

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Let

The let statement is a complement to the set statement, used for defining script variables. The let statement, in opposition to the set statement, evaluates the expression on the right side of the ' =' before it is assigned to the variable.

[**Let**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Let.htm) variablename=expression

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Loosen Table

One or more QlikView internal data tables can be explicitly declared loosely coupled during script execution by using a Loosen Table statement. The use of one or more Loosen Table statements in the script will make QlikView disregard any setting of tables as loosely coupled made before the script execution.

[**loosen-table**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/loosen-table.htm) tablename [ , tablename2 ...]

Loosen Tables tablename [ , tablename2 ...]

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Map ... using

The map ... using statement is used for mapping a certain field value or expression to the values of a specific mapping table. The mapping table is created through the Mapping statement.

[**Map**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Map.htm) \*fieldlist Using mapname

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### NullAsNull

The NullAsNull statement turns off the conversion of NULL values to string values previously set by a NullAsValue statement.

[**NullAsNull**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/NullAsNull.htm) \*fieldlist

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### NullAsValue

The NullAsValue statement specifies for which fields that NULL should be converted to a value.

[**NullAsValue**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/NullAsValue.htm) \*fieldlist

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Qualify

The Qualify statement is used for switching on the qualification of field names, i.e. field names will get the table name as a prefix.

[**Qualify**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Qualify.htm) \*fieldlist

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Rem

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)The rem statement is used for inserting remarks, or comments, into the script, or to temporarily deactivate script statements without removing them.

[**Rem**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Rem.htm) string

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Rename Field

This script function renames one or more existing QlikView field(s) after they have been loaded.

[**rename-field**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/rename-field.htm) (using mapname | oldname to newname{ , oldname to newname })

Rename Fields (using mapname | oldname to newname{ , oldname to newname })

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Rename Table

This script function renames one or more existing QlikView internal table(s) after they have been loaded.

[**rename-table**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/rename-table.htm) (using mapname | oldname to newname{ , oldname to newname })

Rename Tables (using mapname | oldname to newname{ , oldname to newname })

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Section

With the section statement, it is possible to define whether the subsequent LOAD and SELECT statements should be considered as data or as a definition of the access rights.

[**Section**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Section.htm) (access | application)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Select

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)The selection of fields from an ODBC data source or OLE DB provider is made through standard SQL SELECT statements. However, whether the SELECT statements are accepted depends on the ODBC driver or OLE DB provider used.

[**Select**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Select.htm) [all | distinct | distinctrow | top n [percent] ] \*fieldlist

From tablelist

[Where criterion ]

[Group by fieldlist [having criterion ] ]

[Order by fieldlist [asc | desc] ]

[ (Inner | Left | Right | Full)Join tablename on fieldref = fieldref ]

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Set

The set statement is used for defining script variables. These can be used for substituting strings, paths, drives, and so on.

[**Set**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Set.htm) variablename=string

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Sleep

The sleep statement pauses script execution for a specified time.

[**Sleep**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Sleep.htm) n

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### SQL

The SQL statement allows you to send an arbitrary SQL command through an ODBC or OLE DB connection.

[**SQL**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/SQL.htm) sql\_command

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### SQLColumns

The sqlcolumns statement returns a set of fields describing the columns of an ODBC or OLE DB data source, to which a connect has been made.

[**SQLColumns**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/SQLColumns.htm)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### SQLTables

The sqltables statement returns a set of fields describing the tables of an ODBC or OLE DB data source, to which a connect has been made.

[**SQLTables**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/SQLTables.htm)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### SQLTypes

The sqltypes statement returns a set of fields describing the types of an ODBC or OLE DB data source, to which a connect has been made.

[**SQLTypes**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/SQLTypes.htm)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Star

The string used for representing the set of all the values of a field in the database can be set through the star statement. It affects the subsequent LOAD and SELECT statements.

[**Star**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Star.htm) is [ string ]

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Store

This script function creates a QVD or a CSV file.

[**Store**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Store.htm) [ \*fieldlist from] table into filename [ format-spec ];

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Tag

This script function provides a way of assigning tags to one or more fields. If an attempt to tag a field name not present in the document is made, the tagging will be ignored. If conflicting occurrences of a field or tag name are found, the last value is used.

[**Tag**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Tag.htm) fields fieldlist using mapname

Tag field fieldname with tagname

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Trace

The trace statement writes a string to the Script Execution Progress window and to the script log file, when used. It is very useful for debugging purposes. Using $-expansions of variables that are calculated prior to the trace statement, you can customize the message.

[**Trace**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Trace.htm) string

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Unmap

The Unmap statement disables field value mapping specified by a previous Map … Using statement for subsequently loaded fields.

[**Unmap**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Unmap.htm) \*fieldlist

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Unqualify

The Unqualify statement is used for switching off the qualification of field names that has been previously switched on by the Qualify statement.

[**Unqualify**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Unqualify.htm) \*fieldlist

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/script-regular-statements.htm)

#### Untag

Provides a way of removing tags from one or more fields. If an attempt to untag a Field name not present in the document is made, the untagging will be ignored. If conflicting occurrences of a field or tag name is found, the last value is used.

[**Untag**](https://help.qlik.com/en-US/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptRegularStatements/Untag.htm) fields fieldlist using mapname

Untag field fieldname with tagname