SAS中文论坛

 找回密码
 立即注册

扫一扫,访问微社区

查看: 763|回复: 6
打印 上一主题 下一主题

reading ACCESS

[复制链接]

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
楼主
 楼主| 发表于 2010-2-19 07:03:10 | 只看该作者

reading ACCESS

When reading ACCESS tables to SAS, I find that, for example,

[code:keisxull]proc import out = aaa_ datatable = “AccessTableName” dbms = access replace;
                database = "dataBase";
run;[/code:keisxull]
where AccessTableName has to be no more than 32 characters long.  
Anyone has an idea on that? How to solve this problem without changing the table name in ACCESS.

Many thanks to you,

JingJu
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
沙发
 楼主| 发表于 2010-2-19 07:48:07 | 只看该作者

Re: reading ACCESS

try VALIDVARNAME=ANY system option
default is VALIDVARNAME=V7, which limits to 32 alphanumeric chars
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
板凳
 楼主| 发表于 2010-2-19 08:17:42 | 只看该作者

Re: reading ACCESS

Thank you for the reply.
In fact, as my understanding, option ‘validVarName =’ is working on SAS variable names, but nothing to do with ACCESS table name. I am thinking if we can try other importing schemes.
JingJu
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
地板
 楼主| 发表于 2010-2-19 08:34:40 | 只看该作者

Re: reading ACCESS

quote SAS manual:
"VALIDVARNAME=ANY allows any characters in DBMS column names to appear as valid characters in SAS variable names. Symbols, such as the equal sign (=) and the asterisk (*), must be contained in a 'variable-name'n construct. You must use ANY whenever you want to read DBMS column names that do not follow the SAS naming conventions."

I don't have ACCESS on my machine therefore I can't test it, but, you can give the solution a try and you will know whether it works or not.
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
5#
 楼主| 发表于 2010-2-19 09:02:35 | 只看该作者

Re: reading ACCESS

I may not illustrate my question explicitly. Sorry about that. In fact, I am asking about ACCESS table name instead of variable name. I don't know how to do it thus I ask you. I did try the way (=any) as you mentioned and unfortunately it did not work. Moreover, I am not sure if ‘validvarname = any’ can increase the maximum length of the variable. I have ACCESS and I tried it, please trust me.
By the way I dropped by your blog, such amazing code you have written! Very nice.
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
6#
 楼主| 发表于 2010-2-19 09:15:15 | 只看该作者

Re: reading ACCESS

okay, I see. Sorry, I don't know the answer. A better place for you is SAS-L, more SAS gurus there. I am not good at pure SAS programming details

Thanks for your complimentary words on my blog. I am preparing two SAS recipe books for modern data mining algorithms, complements, respectively, to Matrix Methods in Data Mining & Pattern Recognition, and The Elements of Statistical Learning.

If you have time, give me a vote at <!-- m --><a class="postlink" href="http://ires.ku.edu/%7Eipsr/SGF2010/royvote.htm">http://ires.ku.edu/%7Eipsr/SGF2010/royvote.htm</a><!-- m -->
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
7#
 楼主| 发表于 2010-2-23 02:17:46 | 只看该作者

Re: reading ACCESS

ACCESS是高科技
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SAS中文论坛  

GMT+8, 2026-2-6 11:33 , Processed in 0.081038 second(s), 22 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表