Date: Tue, 16 Sep 2003 14:06:45 -0400
Reply-To: "Elmaache, Hamani" <Hamani.Elmaache@CCRA-ADRC.GC.CA>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Elmaache, Hamani" <Hamani.Elmaache@CCRA-ADRC.GC.CA>
Subject: Re: ODBC problem!
Content-Type: text/plain; charset="iso-8859-1"
Hi Ravi.
I tried it. It doesn't work. I work in two computers. On One, my code well(
NOT very wee but it works with some problems..), on the other doesn't work.
I think the ODBC not installed in latest. How to do it? I don't know.
Thanks a lot.
-----Original Message-----
From: Prasad S Ravi [mailto:prasad.s.ravi@HOUSEHOLD.COM]
Sent: September 16, 2003 2:09 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: ODBC problem!
Can you try using double quotes in the libname statement instead of single
quotes and see if it works?.
also make sure the file sha.xls exists and looks OK in C:\ drive.
Prasad Ravi
"Elmaache, Hamani"
<Hamani.Elmaache@CCRA To:
SAS-L@LISTSERV.UGA.EDU
-ADRC.GC.CA> cc:
Sent by: "SAS(r) Subject: ODBC problem!
Discussion"
<SAS-L@LISTSERV.UGA.E
DU>
09/16/2003 10:35 AM
Please respond to
"Elmaache, Hamani"
Hi there.
I trying to use ODBC to order to get from Excel data set. But it does't
work.
Here my code and Error message, if somebody can help:
libname xl odbc
noprompt='dsn=Excel Files;
dbq=C:\sha.xls';
proc sql noprint;
select distinct "xl.'"||trim(memname)||"'n"
into :xlsheets separated by ' '
from dictionary.members
where libname='XL' and index(memname,'$')>0;
quit;
data sha;
set &xlsheets;
run;
*********************************
LOG:
651 dbq=C:\sha.xls';
ERROR: CLI error trying to establish connection: [Microsoft][ODBC Driver
Manager] Data source
name not found and no default driver specifie
ERROR: Error in the LIBNAME statement.
652
653 proc sql noprint;
654 select distinct "xl.'"||trim(memname)||"'n"
655 into :xlsheets separated by ' '
656 from dictionary.members
657 where libname='XL' and index(memname,'$')>0;
NOTE: No rows were selected.
658 quit;
NOTE: PROCEDURE SQL used:
real time 0.00 seconds
cpu time 0.00 seconds
659
660 data sha;
NOTE: SCL source line.
661 set &xlsheets;
-
22
--------
202
WARNING: Apparent symbolic reference XLSHEETS not resolved.
ERROR: File WORK.XLSHEETS.DATA does not exist.
ERROR 22-322: Syntax error, expecting one of the following: a name, a
quoted
string, ;, END,
KEY,KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.