SELECT

SELECT is the cornerstone of any SQL query. TARGIT InMemory Database supports the regular SQL select
syntax.

Example:

SELECT [NOCACHE] 
select_list
[ INTO new_table ]
[ FROM table_source [AS alias1] ]
{[ INNER|LEFT JOIN table2 (as a2) on alias1.ColX = a2.ColY ]
} [ ,...n ]
[ WHERE search_condition ]
[ GROUP BY group_by_expression ]
[ HAVING search_condition ]
[ ORDER BY {order_expression} [ ,...n ] ]
[ LIMIT n ]

The UNION ALL operator can be used between queries to combine or compare results into one result set.

The SELECT Clause supports selecting from fields in the From Clause, doing expression using + / - *
and ( ) and other functions. It also supports SUM, MAX, MIN , AVG, COUNT,
COUNT ( DISTINCT some-field ) aggregate functions. Aggregate functions can also be combined.

CASE Statements with multiple WHEN Clause are also supported.

Note1: If you do use an Alias for a field or table, the keyword “AS” is required.

Note2: SELECT INTO works in tiQuery, creating the named table in the InMemory database. However, since there is no way to SAVE from within tiQuery, once you close the tiQuery window the created table will be lost.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.