13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>SAS</strong>/<strong>ACCESS</strong> Interface to Sybase IQ 4 Special Catalog Queries 769(host=iqsvr1 server=iqsrv1_users db=users user=iqusr1 password=iqpwd1);select * from connection to dbcon(select * from customers where customer like ’1%’);quit;Special Catalog Queries<strong>SAS</strong>/<strong>ACCESS</strong> Interface to Sybase IQ supports the following special queries. You canthe queries use to call the ODBC-style catalog function application programminginterfaces (APIs). Here is the general <strong>for</strong>mat of the special queries:SIQ::SQLAPI “parameter 1”,”parameter n”SIQ::is required to distinguish special queries from regular queries. SIQ:: is not casesensitive.SQLAPIis the specific API that is being called. SQLAPI is not case sensitive."parameter n"is a quoted string that is delimited by commas.Within the quoted string, two characters are universally recognized: the percent sign(%) and the underscore (_). The percent sign matches any sequence of zero or morecharacters, and the underscore represents any single character. To use either characteras a literal value, you can use the backslash character (\) to escape the matchcharacters. For example, this call to SQLTables usually matches table names such asmyatest and my_test:select * from connection to sybaseiq (SIQ::SQLTables "test","","my_test");Use the escape character to search only <strong>for</strong> the my_test table:select * from connection to sybaseiq (SIQ::SQLTables "test","","my\_test");<strong>SAS</strong>/<strong>ACCESS</strong> Interface to Sybase IQ supports these special queries.SIQ::SQLTables returns a list of all tables that match the specified arguments. If you do notspecify any arguments, all accessible table names and in<strong>for</strong>mation are returned.SIQ::SQLColumns returns a list of all columns that match the specified arguments. If you do notspecify any argument, all accessible column names and in<strong>for</strong>mation are returned.SIQ::SQLPrimaryKeys returns a list of all columns that compose the primary key that matches thespecified table. A primary key can be composed of one or more columns. If you donot specify any table name, this special query fails.SIQ::SQLSpecialColumns returns a list of the optimal set of columns that uniquely identify a row in thespecified table.SIQ::SQLStatistics returns a list of the statistics <strong>for</strong> the specified table name, with options ofSQL_INDEX_ALL and SQL_ENSURE set in the SQLStatistics API call. If you donot specify any table name argument, this special query fails.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!