免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2469 | 回复: 3
打印 上一主题 下一主题

菜鸟求助 sybase sql 语法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-09-05 16:36 |显示全部楼层 |倒序浏览
麻烦大家给改下 谢谢了
select a.*,b.* from rl_unit_name a, (select user_id from rl_unit_name)b where a.id=b.id

论坛徽章:
0
2 [报告]
发表于 2012-09-06 08:52 |显示全部楼层
本帖最后由 abbywl 于 2012-09-06 08:53 编辑

非常感谢2楼  可是这样写回报异常   Incorrect syntax near the keyword 'select'.
貌似sybase不支持 (select user_id from rl_unit_name)b 这样写
应该怎么写呢

论坛徽章:
0
3 [报告]
发表于 2012-09-06 10:56 |显示全部楼层
本帖最后由 abbywl 于 2012-09-06 10:57 编辑

版本12.5,原语句是这样滴
select a.* from rl_unit_name a,
(select  max(un_name_date) un_name_date ,un_inner_code from rl_unit_name group by un_inner_code) b where
a.un_inner_code=b.un_inner_code and a.un_name_date=b.un_name_date
报错Incorrect syntax near the keyword 'select'.

论坛徽章:
0
4 [报告]
发表于 2012-09-06 11:28 |显示全部楼层
还是不行呀
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP