zoukankan      html  css  js  c++  java
  • PB 游标语法

    declare getstoragecard cursor for
            select to_char(needday,'yyyy-mm-dd'),sum(a.somany - a.storage - b.mademany)
                    from mrp_detial a,v_new_tj_all_mrpmany b
                    where a.mpsid=b.mpsid and
                            a.indexcode=b.mpsindex and
                            a.lifecode=6 and
                            a.needday>=sysdate  and
                            a.soncode=:productid 
                    group by to_char(needday,'yyyy-mm-dd')
                    ORDER BY to_char(needday,'yyyy-mm-dd');
    open getstoragecard;
    do while sqlca.sqlcode=0
            fetch getstoragecarD into :sday,:manyin;
            if sqlca.sqlcode=0 then
                    i=dw_card.insertrow(0)
                    dw_card.object.typein[i]='计划入库'
                    dw_card.object.dayin[i]=sday
                    dw_card.object.manyin[i]=manyin
            else
                    exit
            end if
    loop
    close getstoragecard;

  • 相关阅读:
    Python如何爬取淘宝MM呢?教你一招
    Python爬虫实战之如何爬取百度贴吧帖子?案例详解
    SpringBoot定时任务如何正确运用?案例详解
    JS数组之重排序方法
    JS数组之栈和队列
    JS数组之转换方法
    计算机相关推荐教程
    多维数组
    重新认识变量和数组
    数组
  • 原文地址:https://www.cnblogs.com/Bokeyan/p/12205675.html
Copyright © 2011-2022 走看看