| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1098 人关注过本帖
标题:我哪里缺少右括号了????求助
取消只看楼主 加入收藏
观星
Rank: 2
等 级:论坛游民
帖 子:77
专家分:45
注 册:2008-5-1
结帖率:90.91%
收藏
 问题点数:0 回复次数:1 
我哪里缺少右括号了????求助
程序代码:
insert into t_xs_jjcl_rz
(id,rq,ch,cp_id,cp_name,kh_id,kh_name,user_id,user_name) 
values
(
(select decode(max(to_number(id)),null,0,max(to_number(id)))+1 from t_xs_jjcl_rz),
'2011-08-30 11:16',
(select ch from t_qc_bzpzb WHERE gxtype=0 and CH='111'),
(select cp_id from t_xs_CH_JSDW WHERE rownum<=1 and CH='111' order by ch,kh_id),
(select cp_name from t_xs_CH_JSDW WHERE rownum<=1 and CH='111' order by ch,kh_id),
(select kh_id from t_xs_CH_JSDW WHERE rownum<=1 and CH='111' order by ch,kh_id),
(select kh_name from t_xs_CH_JSDW WHERE rownum<=1 and CH='111' order by ch,kh_id),
1,
(select name from t_um_user where id=1)
)


提示我缺少右括号,我没少啊。。。大家能帮我看看么,谢谢!
2011-08-30 12:04
观星
Rank: 2
等 级:论坛游民
帖 子:77
专家分:45
注 册:2008-5-1
收藏
得分:0 
已解决!
可能是order by 的问题
我把语句改成这样的就可以执行了
程序代码:
insert into t_xs_jjcl_rz
(id,rq,ch,cp_id,cp_name,kh_id,kh_name,user_id,user_name) 
values
(
(select decode(max(to_number(id)),null,0,max(to_number(id)))+1 from t_xs_jjcl_rz),
'2011-08-30 11:16',
(select ch from t_qc_bzpzb WHERE gxtype=0 and CH='111'),
(select cp_id from (select cp_id from t_xs_CH_JSDW WHERE rownum<=1 and CH='111' order by ch,kh_id)),
(select cp_name from (select cp_name from t_xs_CH_JSDW WHERE rownum<=1 and CH='111' order by ch,kh_id)),
(select kh_id from (select kh_id from t_xs_CH_JSDW WHERE rownum<=1 and CH='111' order by ch,kh_id)),
(select kh_name from (select kh_name from t_xs_CH_JSDW WHERE rownum<=1 and CH='111' order by ch,kh_id)),
1,
(select name from t_um_user where id=1)
)
2011-08-30 12:32
快速回复:我哪里缺少右括号了????求助
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.041050 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved