|
How confident are you that foxpro booleans can be null? I'm pretty sure
for instance that msaccess' booleans cannot...
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Tracy Haidar
Sent: Monday, April 12, 2004 4:56 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: ODBC and null handling for boolean fields
I frequently use SAS to import data from an Advantage (odbc-compliant)
database...I assign a libname as follows (after setting up a User DSN
for the database):
libname temp odbc
dsn=myDSN;
then I create data sets using proc sql.
Today I tried to do the same thing for a FoxPro database. I installed
the most recent FoxPro odbc driver and created a user datasource, as
usual. I didn't get any errors in reading in the FoxPro tables into sas
using proc sql; however, for all of my boolean fields, nulls were
translated to false
(0) in sas. In other words, for Yes/No/null fields, I was instead left
with 1=Yes and 0=null or no. How can I prevent this from happening? I
want a null to stay a null.
Thanks in advance.
|