楼主: wshnyy
9682 6

怎样用proc sql里把重新命名变量名字? [推广有奖]

  • 1关注
  • 0粉丝

已卖:51份资源

本科生

67%

还不是VIP/贵宾

-

威望
0
论坛币
167 个
通用积分
0.1580
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
1397 点
帖子
108
精华
0
在线时间
97 小时
注册时间
2005-3-10
最后登录
2023-4-22

楼主
wshnyy 发表于 2013-5-22 14:56:52 |AI写论文
10论坛币
同志们,开始悬赏了。。。

我用proc sql从oracle数据库中取数据,在生成的data set中,我想用wbsdh 来替换数据库中的字段 a.wobushidshuilang 据,开是,同志们我发现我写得不管用呀。运行后,生成的变量还是数据库里的那个字段wobushidshuilang


怎么弄?谢谢 。10块币表表心意。。。




proc sql;
select a.wobushidshuilang  as wbsdhl
from someplace.sometable as a
where a.number=88;
quit;

最佳答案

可~乐 查看完整内容

那是因为之前变量label的关系
关键词:proc sql sql ROC Number Oracle sql

回帖推荐

可~乐 发表于3楼  查看完整内容

那是因为之前变量label的关系

沙发
可~乐 发表于 2013-5-22 14:56:53
那是因为之前变量label的关系
  1. proc sql;
  2. select a.wobushidshuilang  as wbsdhl label="wbsdhl "
  3. from someplace.sometable as a
  4. where a.number=88;
  5. quit;
复制代码

藤椅
didizhang 发表于 2013-5-22 19:20:04
select a as b?

板凳
wshnyy 发表于 2013-5-25 10:15:40
可~乐 发表于 2013-5-22 21:13
那是因为之前变量label的关系
谢谢回答。 为什么as wbsdh1后要加 label=‘wbsdh1’?
如果02.select a.wobushidshuilang label="wbsdhl "
不加as wbsd1会怎么样?

谢谢

报纸
可~乐 发表于 2013-5-25 17:54:31
wshnyy 发表于 2013-5-25 10:15
谢谢回答。 为什么as wbsdh1后要加 label=‘wbsdh1’?
如果02.select a.wobushidshuilang label="wbsd ...
那变量名还是wobushidshuilang,不过它的标签会变成wbsdhl 。。。

地板
Bridgenc 发表于 2013-5-25 20:17:22
Try this:

proc sql;
create table one as
select a.wobushidshuilang  as wbsdhl
from someplace.sometable as a
where a.number=88;
quit;

proc datasets lib=work memtype=data;
   modify one;
     attrib _all_ label=' ';
run;

7
zhw0905 发表于 2016-7-25 15:50:03
proc sql;
create table a.wbsdhl as
select a.wobushidshuilang
from someplace.sometable as a
where a.number=88;
quit;
在逻辑库a中直接找表wbsdhl

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-13 16:25