21.01.2013 Views

QlikView Reference Manual.pdf - QlikCommunity - QlikView

QlikView Reference Manual.pdf - QlikCommunity - QlikView

QlikView Reference Manual.pdf - QlikCommunity - QlikView

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Back to Script Statements and Keywords (page 219).<br />

Let<br />

The let statement has been created as a complement to the Set (page 264) statement, used for defining<br />

Script Variables (page 273). The let statement, in opposition to the set statement, evaluates the expression<br />

on the right side of the ' =' before it is assigned to the variable.<br />

The word let may be omitted, but the statement then becomes a control statement. Such a statement without<br />

the keyword let must be contained within a single script row and may be terminated either with a semicolon<br />

or end-of-line.<br />

The syntax is:<br />

let variablename=expression<br />

Note that the word let may be omitted.<br />

Examples:<br />

Set x=3+4;<br />

Let y=3+4<br />

z=$(y)+1;<br />

$(x) will be evaluated as ' 3+4 '<br />

$(y) will be evaluated as ' 7 '<br />

$(z) will be evaluated as ' 8 '<br />

Let T=now( );<br />

$(T) will be given the value of the current time.<br />

Back to Script Statements and Keywords (page 219).<br />

Load<br />

The load statement loads Fields (page 169) from a typed ASCII file, from data defined in the script, from a<br />

previously loaded table, from the result of a following select statement or by generating data automatically.<br />

The general syntax of the load statement is:<br />

load [ distinct ] *fieldlist<br />

[( from file [ format-spec ] |<br />

from_fieldfield [format-spec]<br />

inline data [ format-spec ] |<br />

residenttable-label |<br />

autogenerate size )]<br />

[ where criterion ] | while criterion ]<br />

[ group_by fieldlist ]<br />

[order_by field [ sortorder ] { , field [ sortorder ] } ]<br />

where:<br />

distinct is a predicate used if only the first of duplicate records should be loaded.<br />

*fieldlist ::= ( * | field { , field } )<br />

246<br />

A list of the fields to be loaded. Using * as field list indicates all fields in the table.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!