LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 25 Aug 2009 17:56:29 -0700
Reply-To:     "Nordlund, Dan (DSHS/RDA)" <NordlDJ@DSHS.WA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Nordlund, Dan (DSHS/RDA)" <NordlDJ@DSHS.WA.GOV>
Subject:      Re: SAS/ACCESS Libname: Reading Tables with Names Longer than 32
              Characters
In-Reply-To:  <200908260039.n7PLEHUZ029205@malibu.cc.uga.edu>
Content-Type: text/plain; charset=windows-1252

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > Arthur Tabachneck > Sent: Tuesday, August 25, 2009 5:39 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: SAS/ACCESS Libname: Reading Tables with Names Longer than 32 > Characters > > Paul, > > I don't have access to SQL Server, but I use the following method for > shortening long directory names for Excel: use x to run Window's substr > command to assign the long directory name to an unused directory letter (I > usually use X:\). > > i.e., > x 'subst x: "\\winsrvp03\sastemp\art\test\long named folder\even longer > named folder"'; > > libname test "x:\sufficiently long filename.xls"; > > > If you choose to use that method, just make sure that you unassign the > directory. I.e., x "subst x: /d"; > > Art > --------- > On Tue, 25 Aug 2009 15:59:28 -0700, Paul Miller <pjmiller_57@YAHOO.COM> > wrote: > > >Hello Everyone, > >� > >I've recently learned about the SAS/ACCESS libname and manged to write the > code for reading SQL Server tables that appears below. I'm receiving > databases that�contain tables with names�substantially longer than the 32 > character�limit and was just wondering if anyone�knows a way of dealing > with this. My hope was that there might be an option that would tell SAS to > truncate any table names that go beyond the 32 character�limit,�but I > haven't been able to find anything like that. > >� > >Thanks,

Art,

It sounds like Paul's problem may be that some table names (independent of any path information) in SQL Server are too long to be valid SAS dataset names.

Paul,

I don't know if SQL Server supports it, but in Oracle one can assign an alias for table names. If that is possible you could alias the table name with a shorter name. If you can't do that, then if you have SAS ACCESS ODBC or SQL Server drivers, you could use pass-thru SQL to read the table and create SAS datasets out of the returned results, but with shorter file names

Hope this is helpful,

Dan

Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Data Analysis Division Olympia, WA 98504-5204


Back to: Top of message | Previous page | Main SAS-L page