Date: Thu, 28 Oct 2010 16:00:07 -0400
Reply-To: "Fehd, Ronald J. (CDC/OCOO/ITSO)" <rjf2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J. (CDC/OCOO/ITSO)" <rjf2@CDC.GOV>
Subject: Re: importing Access extension = accdb
In-Reply-To: <AANLkTinC3c=MHgwsHb1=WZ=+3PGvaF6QZnadqfNCCKkY@mail.gmail.com>
Content-Type: text/plain; charset=us-ascii
LOL
I, too, had to squint at what I read as
MyLifeRaft
before I got all the letters rearranged
thanks
Ron a roofreader
From: Joe Matise [mailto:snoopy369@gmail.com]
Sent: Thursday, October 28, 2010 3:56 PM
To: Fehd, Ronald J. (CDC/OCOO/ITSO)
Cc: SAS-L@listserv.uga.edu
Subject: Re: importing Access extension = accdb
Originally it didn't work, but then I realized it's getting close to
friday, and I needed to put on my toby-glasses, even though this wasn't
a request from toby...
3720 LIBNAME
3721 MyLibref Access %*<---<<< ? !;
3722 PATH='C:\temp\Database1.accdb';
NOTE: Libref MYLIBREF was successfully assigned as follows:
Engine: ACCESS
Physical Name: C:\temp\Database1.accdb
3723
3724 proc sql;
3724! describe table MyLifRef.Table1;
ERROR: Libname MYLIFREF is not assigned.
3725 quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.62 seconds
cpu time 0.00 seconds
***toby-glasses donned, typo corrected;
3726
3727 proc sql;
3727! describe table MyLibRef.Table1;
NOTE: SQL table MYLIBREF.Table1 was created like:
create table MYLIBREF.Table1 (
ID num format=11. informat=11. label='ID',
Field1 char(255) format=$255. informat=$255. label='Field1',
Field2 char(255) format=$255. informat=$255. label='Field2'
);
3728 quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.81 seconds
cpu time 0.01 seconds
If you want an ACCDB file to play with, I can send you the above file.
-Joe
On Thu, Oct 28, 2010 at 2:32 PM, Fehd, Ronald J. (CDC/OCOO/ITSO)
<rjf2@cdc.gov> wrote:
I am looking at SAS doc
for importing MS Access file-extension=accdb
http://support.sas.com/documentation/cdl/en/acpcref/63184/HTML/default/v
iewer.htm#a002107496.htm
<http://support.sas.com/documentation/cdl/en/acpcref/63184/HTML/default/
v%0Aiewer.htm#a002107496.htm>
> EXCEL for Microsoft Excel 5, 95, 97, 2000, 2002, 2003, and 2007.
> Example 1:
> This LIBNAME statement specifies xdb as a reference to a SAS library.
> The EXCEL engine specifies the engine that supports the connection to
the file type .XLSX.
> LIBNAME xdb EXCEL PATH='C:\PCFData\Demo.xlsx';
> ACCESS for Microsoft Access 97, 2000, 2002, 2003, and 2007.
> Example 2:
> This example illustrates using LIBNAME statement with physical
filename,
> including the file's extension.
> The accdb file extension provides SAS information about the data type.
> The PATH= option provides SAS with the location of the data.
> LIBNAME PATH='C:\PCFData\Demo.accdb';
???
surely this should be:
LIBNAME
MyLibref Access %*<---<<< ? !;
PATH='C:\PCFData\Demo.accdb';
proc sql; describe table MyLifRef.<Access-table-name>;
quit;
can someone w/an Access 2007 file chk whether the sql works?
thnx
Ronald J. Fehd, IT Spec
HelpDesk Level 3: SAS