Sql_get_Values Function


c Values = sql_get_values(* conn ,C table ,C filter ,C result_Expression [,L flagDistinct [,N limit [,L flagDescendingOrder [,* args ]]]])



A CRLF delimited string of data from the remote table or query. CRLFs in the data are encoded as '\cr\lf'.


An explicit AlphaDAO connection string, or a named connection string. (e.g. ::name::myconnectionstring), or a pointer to an open connection.


The name of the table in the remote database from which to return data.


A filter expression to determine which records in the remote table to find. The filter expression must use SQL syntax and must use portable AlphaDAO functions. For example, strings must be single quoted, the AND, OR and NOT operators are not surrounded by periods. The filter expression can use arguments. For example, customerid = :whatcustomerid. If table_or_sql_statement is a SQL SELECT then filter is meaningless and must be set to a null string.


A expression to determine what values gets returned. The expression can be as simple as a single column name in the remote table, or it can be a complex expression. The expression must be written using portable AlphaDAO syntax. r


Logical. Default for this if .f.. Specify if only unique values should be returned.


Numeric. Default for this is 1,000. Specify the maximum number of values to return.


Logical. Default for this is .f.. Specify if values should be returned in descending order.


If the filter expression includes arguments, you must supply argument values using a SQL::arguments object.


Returns a CRLF delimited string with data from a table in a remote database using AlphaDAO. Connection can be explicit, or a named connection (e.g. ::name::myconnection).