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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

08:00 4 Start of shift 2 D 07:23 11:43<br />

11:43 5 End of production D 07:23 11:43<br />

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

IntervalMatch (Extended Syntax)<br />

The extended IntervalMatch prefix to a Load (page 246) or Select (SQL) (page 262) statement is used for<br />

matching discrete data to one or more dimensions that are changing over time. This is a very powerful and<br />

flexible feature that can be used for resolving with slowly changing dimensions by linking the specific key<br />

field(s) to the appropriate numeric intervals. The syntax is:<br />

intervalmatch (matchfield,keyfield1 [ , keyfield2, ... keyfield5 ]<br />

) (loadstatement | selectstatement )<br />

matchfield is the field containing the discrete numeric values to be linked to intervals.<br />

keyfield(s) are fields that contain the attributes that are to be matched using the interval.<br />

loadstatement or selectstatement must result in a table where the first two fields contain the lower and upper<br />

limits of each interval and the third and any subsequent fields contain the keyfield(s) present in the IntervalMatch<br />

statement. The intervals are always closed, i.e. the end points are included in the interval. Nonnumeric<br />

limits render the interval to be disregarded (undefined) while NULL limits extend the interval indefinitely<br />

(unlimited). The intervals may be overlapping and values will be linked by all matching intervals.<br />

In order to avoid undefined interval limits being disregarded, it is necessary to allow NULL values to map to<br />

other fields that constitute the lower or upper limits to the interval. This can be handled by the NullAsValue<br />

(page 255) statement.<br />

Before the IntervalMatch statement, the field containing the discrete data points (Date in the example<br />

below) must already have been read into <strong>QlikView</strong>. The IntervalMatch statement does not by itself read<br />

this field from the database table.<br />

Example:<br />

Inner Join IntervalMatch (Date,Key) Load FirstDate, LastDate, Key resident<br />

Key;<br />

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

Join<br />

The join prefix joins the loaded table with an existing named table or the last previously created logical<br />

table. The join is a natural join made over all the common Fields (page 169). The join statement may be<br />

preceded by one of the prefixes Inner (page 239), Outer (page 255), Left (page 244) or Right (page 259).<br />

join [ (tablename ) ]( loadstatement | selectstatement )<br />

Examples:<br />

Join Load * from abc.csv;<br />

Join Select * from table1;<br />

tab1:<br />

Load * from file1.csv;<br />

tab2:<br />

243

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

Saved successfully!

Ooh no, something went wrong!