This example retrieves
a subset of rows from the Sybase INVOICE table. Because the WHERE
clause is specified in the DBMS query (the inner SELECT statement),
the DBMS processes the WHERE expression and returns a subset of rows
to SAS.
proc sql;
connect to sybase(server=SERVER1
database=INVENTORY
user=testuser password=testpass);
%put &sqlxmsg;
select * from connection to sybase
(select * from INVOICE where BILLEDBY=457232);
%put &sqlxmsg;
The SELECT statement
that is enclosed in parentheses is sent directly to the database and
therefore must be specified using valid database variable names and
syntax.