Neoview SQL Reference Manual (R2.2)

Join Limits
NOTE: HP recommends that you limit the number of tables in a join to a maximum of 64, which
includes base tables of views referenced in joins. Queries with joins that involve a larger number
of tables are not guaranteed to compile.
Object Names in SELECT
You can use fully qualified names only in the FROM clause of a SELECT statement.
AS and ORDER BY Conflicts
When you use the AS verb to rename a column in a SELECT statement, and the ORDER BY
clause uses the original column name, the query fails. If a column has been aliased to another
name, you must use the alias name. The ANSI standard does not support this type of query.
Stream Access Restrictions
SELECT statements can access only one table with stream access, except for unions that
allow both SELECT statements to use stream access. However, you must use UNION ALL
when using stream access with unions.
You cannot join two streams.
Aggregate functions are not supported on streams and, therefore, no GROUP BY or HAVING
clauses are valid on streams.
Sort operations are not supported on streams. Therefore, you cannot use DISTINCT, UNION
DISTINCT, or ORDER BY unless supported by an index. You can use a secondary index for
accessing an ordered stream only if the columns in the index definition include all the
columns of the base table accessed as a stream that are referenced in its WHERE clause.
A query expression that serves as a data source for an INSERT statement cannot specify
stream access.
A DELETE or UPDATE statement that is not embedded as a table reference cannot specify
stream access. For example, the statement DELETE FROM STREAM(tab1) is not valid.
If your application must handle a fast rate of publishing into the stream, or publishes rows
in very large transactions, it must be able to handle stream overflows.
Restrictions on Embedded Inserts
You cannot create materialized views using an embedded INSERT statement.
An embedded INSERT cannot be used in a join.
An embedded INSERT cannot appear in a subquery.
An embedded INSERT statement cannot have a subquery in the WHERE clause.
An INSERT statement cannot contain an embedded INSERT statement.
A union between embedded INSERT expressions is not supported.
Declaring a cursor on an embedded INSERT statement is not supported.
DISTINCT Aggregate Functions
An aggregate function can accept an argument specified as DISTINCT, which eliminates duplicate
values before the aggregate function is applied. For a given grouping, multiple DISTINCT
aggregates are allowed and can be used with non distinct aggregates. There is a restriction that
DISTINCT STDDEV and VARIANCE cannot be used with multiple DISTINCT aggregates.
152 SQL Statements