What about using PROC SQL and WHERE clause to search for an observation in a relational database table on a SQL Server? I mean to use a LIBNAME pointing to the database, and refer to the SQL table directly in PROC SQL, something like: LIBNAME lib_sql mySQLdatabase; PROC SQL; CREATE TABLE test AS SELECT * FROM lib_sql.myTable WHERE myFilter; QUIT; Does the whole table need to be copied to local drive then SAS can do the processing ? Or, maybe the SQL server does partial data filtering and only the found observation or none being transferred ? - if this is the case the implication probably could be SQL database can be superiorer than SAS datafiles in terms of efficiency in data processing and data traffics? Thanks, Peng
... View more