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.

join is a qualifier stating if several tables are to be joined together into one. Field names and table names<br />

must be put within quotes if they contain blank spaces or letters from the national character sets. When the<br />

script is automatically generated by <strong>QlikView</strong>, the quotation mark used is the one preferred by the ODBC<br />

driver specified in the data source definition of the data source in the Connect (page 227) statement.<br />

Furthermore, several SELECT statements can sometimes be concatenated into one through the use of a<br />

union operator:<br />

selectstatement union selectstatement<br />

The SELECT statement is interpreted by the ODBC driver, so deviations from the general SQL syntax<br />

might occur depending on the capabilities of the ODBC drivers, e.g.<br />

as is sometimes not allowed, i.e. aliasname must follow immediately after fieldname.<br />

as is sometimes compulsory if an aliasname is used.<br />

distinct, as, where, group by, order by, or union is sometimes not supported.<br />

The ODBC driver sometimes does not accept all the different quotation marks listed above.<br />

Note!<br />

This is not a complete description of the SQL SELECT statement! E.g. SELECT statements can be nested,<br />

several joins can be made in one SELECT statement, the number of functions allowed in expressions is<br />

sometimes very large, etc.<br />

Examples:<br />

SELECT * FROM `Categories`;<br />

SELECT `Category ID`, `Category Name` FROM `Categories`;<br />

SELECT `Order ID`, `Product ID`,<br />

`Unit Price` * Quantity * (1-Discount) as NetSales<br />

FROM `Order Details`;<br />

SELECT `Order Details`.`Order ID`,<br />

Sum(`Order Details`.`Unit Price` * `Order Details`.Quantity) as<br />

`Result`<br />

FROM `Order Details`, Orders<br />

where Orders.`Order ID` = `Order Details`.`Order ID`<br />

group by `Order Details`.`Order ID`;<br />

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

Semantic<br />

Tables containing relations between objects can be loaded through a semantic prefix.<br />

The syntax is:<br />

semantic( loadstatement | selectstatement)<br />

Examples:<br />

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

Semantic Select Object1, Relation, Object2, InverseRelation from<br />

table1;<br />

263

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

Saved successfully!

Ooh no, something went wrong!