Returns information about the non-core SQL extensions used in a SQL statement.
sa_ansi_standard_packages( sql-standard-string, sql-statement-string )
sql-standard-string The standard to use for the core extensions. One of SQL:1999 or SQL:2003.
sql-statement-string The SQL statement to evaluate.
If there are no non-core extensions used for the statement, the result set is empty.
None
None
Following is an example call to the sa_ansi_standard_packages system procedure:
CALL sa_ansi_standard_packages( 'SQL:2003', 'SELECT * FROM ( SELECT o.SalesRepresentative, o.Region, SUM( s.Quantity * p.UnitPrice ) AS total_sales, DENSE_RANK() OVER ( PARTITION BY o.Region, GROUPING( o.SalesRepresentative ) ORDER BY total_sales DESC ) AS sales_rank FROM Product p, SalesOrderItems s, SalesOrders o WHERE p.ID = s.ProductID AND s.ID = o.ID GROUP BY GROUPING SETS( ( o.SalesRepresentative, o.Region ), o.Region ) ) AS DT WHERE sales_rank <= 3 ORDER BY Region, sales_rank'); |
The query generates the following result set:
package_id | package_name |
---|---|
T612 | Advanced OLAP operations |
T611 | Elementary OLAP operations |
F591 | Derived tables |
T431 | Extended grouping capabilities |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |