  | | | WHERE clause not being sent to the server via SAS ODBC | WHERE clause not being sent to the server via SAS ODBC 2007-11-16 - By Pardee, Roy
Back Greetings All,
Apologies if this isn't a proper forum for this question--I've asked on the sas-l listserv & haven't had much response thus far.
SAS is a batch data manipulation programming environment that provides conduits into lots of different types of data sources, including ODBC. It has its own implementation of SQL, in which you can query external data sources, combine them with native sas data, etc. It is usually pretty smart about pushing WHERE conditions over to the db server where it can, but to my dismay, it does not seem to be doing so with MySQL. So when I run this sas code:
* -- ---- ---- ---- ---- ---- ------ ;
libname umls ODBC required = "Driver={MySQL ODBC 3.51 Driver};Server=mpe04n;Port306;Database=umls;User=roy;Password=&roys_pw d;Option=3;" DBMAX_TEXT = 8000 ;
proc sql ; select cui, str as concept_name from umls.mrconso where cui = 'C0000768' ; quit ;
* -- ---- ---- ---- ---- ---- ------ ;
I was shocked to find that it sent a "select * from mrconso" when I looked in the MySQL Administrator. This is not usual behavior--if I ran a simple query like that against mssql, oracle or sybase that WHERE clause (and the field list for that matter) would get passed to the db.
That first statement--the libname, contains what is essentially a connect string. I was thinking (hoping) that I have mis-specified that somehow, and that adding some extra parameter (or changing the option=?) would put things right.
Does anybody have any insight for me?
(In case it matters, I'm running both sas & the mysql server on (different) windows xp machines.)
Many thanks in advance!
-Roy
Roy Pardee Research Analyst/Programmer Group Health Center For Health Studies (Cancer Research Network) (206) 287-2078 Google Talk: rpardee
-- MySQL ODBC Mailing List For list archives: http://lists.mysql.com/myodbc To unsubscribe: http://lists.mysql.com/myodbc?unsub=mysql@(protected)
|
|
 |