1625 3

怎么用sql合并数据集,不是同一数据类型的 [推广有奖]

  • 5关注
  • 0粉丝

本科生

83%

还不是VIP/贵宾

-

威望
0
论坛币
8 个
通用积分
0
学术水平
0 点
热心指数
1 点
信用等级
0 点
经验
991 点
帖子
87
精华
0
在线时间
67 小时
注册时间
2015-4-21
最后登录
2016-4-12

楼主
小琪是豆豆猪 发表于 2015-9-21 23:39:08 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
合并两个数据集
1.png
2.png
数据类型不一样,要给他们合并,用sql
自己编的程序是这样
  1. proc sql ;
  2. title 'Subject baseline summary ' ;
  3. footnote '*Disease status : display proportion with disease out of total number of subject in respective group' ;
  4. select * from Means_2
  5. union all corr
  6. select * from Means_3 ;
  7. quit;
复制代码
有error 显示
ERROR: Column 2 from the first contributor of UNION ALL is not the same type as its counterpart from
       the second.
ERROR: Column 3 from the first contributor of UNION ALL is not the same type as its counterpart from
       the second.
ERROR: Column 4 from the first contributor of UNION ALL is not the same type as its counterpart from
       the second.

但是corr 不是可以合并不是同一个类型的么
3.png
这里的corr也不是蓝色的

改成outer union corr 还是不行

请教各位大牛!!!








二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:合并数据 数据类型 数据集 sql Proportion

沙发
Enginx 发表于 2015-9-28 08:40:58
用proc append /force 试下

藤椅
wwwguilichao 学生认证  发表于 2015-9-28 11:22:46
你要先用data步把第一个数据里的变量转化成字符型后在合并

板凳
小琪是豆豆猪 发表于 2015-9-29 15:53:38
wwwguilichao 发表于 2015-9-28 11:22
你要先用data步把第一个数据里的变量转化成字符型后在合并
嗯 问题解决了 谢谢

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 17:59