Returns information about the non-core SQL extensions used in a SQL statement.
sa_ansi_standard_packages( standard, statement )
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 |