SAS/ACCESS
Interface to Greenplum supports the following special queries. You
can use the queries to call functions in ODBC-style function application
programming interfaces (APIs). Here is the general format of the special
queries:
Greenplum::SQLAPI 'parameter–1', 'parameter-n'
is required to distinguish
special queries from regular queries. Greenplum:: is not case sensitive.
is the specific API
that is being called. SQLAPI is not case sensitive.
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 more characters, and the underscore represents any single character.
To use either character as a literal value, you can use the backslash
character (\) to escape the match characters. For example, this call
to SQLTables usually matches table names such as myatest and my_test:
select * from connection to greenplm
(Greenplum::SQLTables "test","","my_test");
Use the escape character
to search only for the my_test table:
select * from connection to greenplm
(Greenplum::SQLTables "test","","my\_test");
SAS/ACCESS Interface
to Greenplum supports these special queries.
Greenplum::SQLTables <
'Catalog',
'Schema',
'Table-name',
'Type'>
returns a list of all
tables that match the specified arguments. If you do not specify any
arguments, all accessible table names and information are returned.
Greenplum::SQLColumns <
'Catalog',
'Schema',
'Table-name',
'Column-name'>
returns a list of all
tables that match the specified arguments. If you do not specify any
arguments, all accessible table names and information are returned.
Greenplum::SQLColumns <
'Catalog',
'Schema',
'Table-name',
'Column-name'>
returns a list of all
columns that match the specified arguments. If you do not specify
any argument, all accessible column names and information are returned.
Greenplum::SQLPrimaryKeys <
'Catalog',
'Schema',
'Table-name''Type' >
returns a list of all
columns that compose the primary key that matches the specified table.
A primary key can be composed of one or more columns. If you do not
specify any table name, this special query fails.
Greenplum::SQLStatistics <
'Catalog',
'Schema',
'Table-name'>
returns a list of the
statistics for the specified table name, with options of SQL_INDEX_ALL
and SQL_ENSURE set in the SQLStatistics API call. If you do not specify
any table name argument, this special query fails.
Greenplum::SQLGetTypeInfo
returns information
about the data types that the Greenplum nCluster
database supports.