Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » SQL Anywhere Server - SQL Reference » System Objects » System procedures » Alphabetical list of system procedures


sa_ansi_standard_packages system procedure

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.



Side effects


See also

Following is an example call to the sa_ansi_standard_packages system procedure:

CALL sa_ansi_standard_packages( 'SQL:2003', 
   FROM ( SELECT o.SalesRepresentative, 
                 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