| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 4283 人关注过本帖
标题:急: EXECUTE IMMEDIATE ls_sql的问题
只看楼主 加入收藏
freele_china
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:JiNan
等 级:版主
威 望:6
帖 子:352
专家分:0
注 册:2007-4-6
收藏
 问题点数:0 回复次数:9 
急: EXECUTE IMMEDIATE ls_sql的问题
高手,帮帮忙吧.

        ls_SqlTxt        =  ' INSERT INTO TQ15T     ' &
                                    +  ' (    prodgb            ,        ' &     
                                    +  '    pwono            ,        ' &     
                                    +  '    prodat            ,        ' &     
                                    +  '    goodcd            ,           ' &
                                    +  '    macncd            ,           ' &                         
                                    +  '    lncd                ,        ' &
                                    +  '    prochs            ,        ' &         
                                    +  '    toqty                ,           ' &
                                    +  '    inqty                ,        ' &
                                    +  '    asqty                ,        ' &
                                    +  '    wesqty            ,        ' &
                                    +  '    basqty            ,        ' &
                                    +  '    okqty                ,        ' &
                                    +  '    decd                ,        ' &
                                    +  '    examno            ,        ' &                             
                                    +  '    strtim                ,        ' &                             
                                    +  '    endtim            ,        ' &                             
                                    +  '    repscd            ,        ' &
                                    +  '    regdat            ,        ' &                             
                                    +  '    restat                )        ' &
                                    +  ' VALUES( "A"        ,        ' &                             
                                    +  '    "' +   ls_wono                                        + '" ,   ' &
                                    +  '    "' +   STRING(ld_prodat, 'MM-DD-YYYY')         + '" ,   ' &
                                    +  '    "' +   ls_goodcd                                        + '" ,   ' &
                                    +  '    "' +   ls_macncd                                    + '" ,   ' &                         
                                    +  '    "' +   ls_lncd                                            + '" ,   ' &
                                    +  '    "' +  '1'                                                + '" ,   ' &     
                                    +  '    "' +  STRING(le_inqty)                            + '" ,   ' &
                                    +  '    "' +  STRING(le_inqty)                            + '" ,   ' &
                                    +  '    "' +  STRING(le_asqty)                            + '" ,   ' &
                                    +  '    "' +  STRING(le_wesqty)                            + '" ,   ' &
                                    +  '    "' +  STRING(le_basqty)                            + '" ,   ' &
                                    +  '    "' +  STRING(le_okqty)                            + '" ,   ' &
                                    +  '    "' +  ls_decd                                            + '" ,   ' &
                                    +  '     "' +  ls_examno                                        + '" ,   ' &
                                    +  '    TO_DATE( "' + STRING(ld_strtim, 'MM-DD-YYYY HH:MM:SS') + '" , "%m-%d-%Y %H:%M:%S" )  , '  &
                                    +  '    TO_DATE( "' + STRING(ld_endtim, 'MM-DD-YYYY HH:MM:SS') + '" , "%m-%d-%Y %H:%M:%S" ) , '  &
                                    +  '     "' +    str_glb.gs_pscd                                + '" ,   ' &                             
                                    +  '    current                                                         ,   ' &                             
                                    +    '    "9"                                                               )     ' &
                            
    

[bold]EXECUTE IMMEDIATE ls_sql ;
在PB中运行后,能进行ROllback吗[/bold]


[[italic] 本帖最后由 freele_china 于 2008-1-10 17:04 编辑 [/italic]]
搜索更多相关主题的帖子: EXECUTE IMMEDIATE sql 
2008-01-10 17:03
freele_china
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:JiNan
等 级:版主
威 望:6
帖 子:352
专家分:0
注 册:2007-4-6
收藏
得分:0 
真有那么难吗

雁过留声,人过留名
2008-01-11 12:12
freele_china
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:JiNan
等 级:版主
威 望:6
帖 子:352
专家分:0
注 册:2007-4-6
收藏
得分:0 
人烟稀少呀,连个回复的人都没有.路过的人越来越少

雁过留声,人过留名
2008-01-11 16:56
freele_china
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:JiNan
等 级:版主
威 望:6
帖 子:352
专家分:0
注 册:2007-4-6
收藏
得分:0 
就还是把它顶起来,让更多的高手看看

雁过留声,人过留名
2008-01-14 08:24
XieLi
Rank: 1
等 级:新手上路
威 望:1
帖 子:762
专家分:0
注 册:2007-7-24
收藏
得分:0 
可以的吧
ROLLBACK USING SQLCA;

拥有蓝天的白云,拥有你的我.
2008-01-14 11:21
zhouyun0
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2007-3-17
收藏
得分:0 
排版好一点再给我们看啦!
2008-01-28 11:40
freele_china
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:JiNan
等 级:版主
威 望:6
帖 子:352
专家分:0
注 册:2007-4-6
收藏
得分:0 
?????!

雁过留声,人过留名
2008-03-04 16:54
ugly927846
Rank: 2
等 级:新手上路
威 望:4
帖 子:90
专家分:0
注 册:2007-6-29
收藏
得分:0 
oracle据说要遇到commit的时候才提交的,你在执行之后用rollback using sqlca试下  .

pb交流群:23037600软件设计师24088104
[url=http://hi.baidu.com/ugly927846] 版主博客[/url]
2008-03-31 16:02
freele_china
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:JiNan
等 级:版主
威 望:6
帖 子:352
专家分:0
注 册:2007-4-6
收藏
得分:0 
谢谢大家,

Rollback;
与Commit, 再动态SQL中同样适用

雁过留声,人过留名
2008-04-01 09:16
ugly927846
Rank: 2
等 级:新手上路
威 望:4
帖 子:90
专家分:0
注 册:2007-6-29
收藏
得分:0 
问题解决就好

pb交流群:23037600软件设计师24088104
[url=http://hi.baidu.com/ugly927846] 版主博客[/url]
2008-04-02 09:31
快速回复:急: EXECUTE IMMEDIATE ls_sql的问题
数据加载中...
 
   



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

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