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;

  • 相关阅读:
    BZOJ 4525 二分
    BZOJ 4565 状压DP
    BZOJ 3930 容斥原理
    BZOJ 4562 搜索...
    BZOJ 4563 错排+高精度
    BZOJ 1833 数位DP
    BZOJ 4517 组合数+错排
    python 入门学习(二)
    python 入门学习
    Python 爬虫
  • 原文地址:https://www.cnblogs.com/Bokeyan/p/12205675.html
Copyright © 2011-2022 走看看