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

雁过留声,人过留名
2008-03-04 16:54
freele_china
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:JiNan
等 级:版主
威 望:6
帖 子:352
专家分:0
注 册:2007-4-6
收藏
得分:0 
谢谢大家,

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

雁过留声,人过留名
2008-04-01 09:16
快速回复:急: EXECUTE IMMEDIATE ls_sql的问题
数据加载中...
 
   



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

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