楼主: jiny.zheng
6833 23

[原创博文] SAS怎么对一定条件计数 [推广有奖]

21
jiny.zheng 发表于 2012-5-4 22:54:40
chendonghui1987 发表于 2012-5-4 16:19
你看看,对不对,最后结果集如下:
学长~我跑的时候存在如下报错

MPRINT(A):   insert into work.result select distinct a.id1, a.id2, a.id3, a.id4, 24 from work.a as a
where input(a.id1,8.) = 69523 and input(a.id2,8.) = 103678 and input(a.id3,8.) = 142089 and
input(a.id4,8.) = 145778;
ERROR 231-375: INPUT function requires a character argument.
ERROR 211-375: Expression using equals (=) has components that are of different data types.
ERROR 231-375: INPUT function requires a character argument.
ERROR 211-375: Expression using equals (=) has components that are of different data types.
ERROR 231-375: INPUT function requires a character argument.
ERROR 211-375: Expression using equals (=) has components that are of different data types.
ERROR 231-375: INPUT function requires a character argument.
ERROR 211-375: Expression using equals (=) has components that are of different data types.
ERROR 231-375: INPUT function requires a character argument.
ERROR 231-375: INPUT function requires a character argument.
ERROR 231-375: INPUT function requires a character argument.
ERROR 231-375: INPUT function requires a character argument.
ERROR 221-375: Value 1 on the SELECT clause does not match the data type of the corresponding column
               listed after the INSERT table name.
ERROR 221-375: Value 2 on the SELECT clause does not match the data type of the corresponding column
               listed after the INSERT table name.
ERROR 221-375: Value 3 on the SELECT clause does not match the data type of the corresponding column
               listed after the INSERT table name.
ERROR 221-375: Value 4 on the SELECT clause does not match the data type of the corresponding column
               listed after the INSERT table name.
是何缘由?
多有打搅~谢谢您!

22
jingju11 发表于 2012-5-5 01:13:30
jiny.zheng 发表于 2012-5-4 22:54
学长~我跑的时候存在如下报错

MPRINT(A):   insert into work.result select distinct a.id1, a.id2,  ...
you can read this:
http://blog.sina.com.cn/s/blog_a3a9263601012tes.html

23
chendonghui1987 发表于 2012-5-6 20:52:41
看着是类型不匹配,你的id1-id4是不是数值类型呀

24
pl172231 发表于 2012-5-7 10:13:56
思路是使用正则表达式进行匹配,具体还请高手

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

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