<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Chan Chen Coding...

    SP

    -- --------------------------------------------------------------------------------
    -- Routine DDL
    -- Note: comments before and after the routine body will not be stored by the server
    -- --------------------------------------------------------------------------------
    DELIMITER $$
    CREATE DEFINER=`root`@`localhost` PROCEDURE `chan_insert_date_by_starttime`()
    BEGIN
      DECLARE var_id decimal(18,0); 
      DECLARE var_issue decimal(18,0); 
      DECLARE var_date datetime ;
      DECLARE cur1 CURSOR FOR 
        SELECT issue, datevalue 
        FROM jira.customfieldvalue
        where customfield in (10006,10007)
        and issue in (
            SELECT distinct issue
            FROM jira.customfieldvalue
            where customfield in (10007)
        )
        and issue not in (
            SELECT distinct issue
            FROM jira.customfieldvalue
            where customfield in (10006)
        );
      OPEN cur1;
      read_loop: LOOP
        FETCH cur1 INTO var_issue, var_date;
          select (max(id) + 1) into var_id from jira.customfieldvalue ;
          INSERT INTO jira.customfieldvalue(id,issue, customfield,datevalue) 
          VALUES (var_id,var_issue,10006, var_date);
      END LOOP;
      CLOSE cur1;
    END



    -- --------------------------------------------------------------------------------
    -- Routine DDL
    -- Note: comments before and after the routine body will not be stored by the server
    -- --------------------------------------------------------------------------------
    DELIMITER $$
    CREATE DEFINER=`root`@`localhost` PROCEDURE `chan_insert_date_by_created`()
    BEGIN
      DECLARE var_id decimal(18,0); 
      DECLARE var_issue decimal(18,0); 
      DECLARE var_date datetime ;
      DECLARE cur1 CURSOR FOR 
        SELECT id, created FROM jira.jiraissue where id in 
        (    SELECT issue 
            FROM jira.customfieldvalue
            where customfield in (10000)
            and issue not in (
                SELECT distinct issue
                FROM jira.customfieldvalue
                where customfield in (10007)
            )
            and issue not in (
                SELECT distinct issue
                FROM jira.customfieldvalue
                where customfield in (10006)
            )
        )  ;
     
      OPEN cur1;
      read_loop: LOOP
        FETCH cur1 INTO var_issue, var_date;
          select (max(id) + 1) into var_id from jira.customfieldvalue ;
          INSERT INTO jira.customfieldvalue(id,issue, customfield,datevalue) 
          VALUES (var_id,var_issue,10006, var_date);
      END LOOP;
      CLOSE cur1;
    END


    -----------------------------------------------------
    Silence, the way to avoid many problems;
    Smile, the way to solve many problems;

    posted on 2012-04-10 18:14 Chan Chen 閱讀(200) 評論(0)  編輯  收藏 所屬分類: DB

    主站蜘蛛池模板: 亚洲日本va午夜中文字幕一区| 亚洲综合日韩久久成人AV| 亚洲综合激情九月婷婷| 无码专区AAAAAA免费视频| 婷婷亚洲综合五月天小说| 99视频在线精品免费| 亚洲综合日韩中文字幕v在线| 男女午夜24式免费视频| 麻豆亚洲av熟女国产一区二| 中文字幕在线免费观看| 亚洲av无码专区在线| 日韩成人在线免费视频 | 免费成人av电影| 猫咪免费观看人成网站在线| 久久精品国产亚洲AV不卡| 国产免费网站看v片在线| 亚洲色四在线视频观看| 欧美a级在线现免费观看| 久久久久亚洲国产AV麻豆| 亚洲毛片不卡av在线播放一区| 黄页免费在线观看 | 亚洲综合免费视频| 亚洲乱码卡一卡二卡三| 成人国产mv免费视频| 国产精品综合专区中文字幕免费播放| 亚洲色婷婷综合久久| 最近免费中文字幕大全免费| 亚洲字幕AV一区二区三区四区| 吃奶摸下高潮60分钟免费视频| 中文字幕一区二区三区免费视频| 亚洲高清中文字幕综合网| 免费看美女被靠到爽的视频| aa在线免费观看| 亚洲人成黄网在线观看| 亚洲日本中文字幕一区二区三区 | 亚洲精品人成无码中文毛片| 24小时日本韩国高清免费| 狠狠入ady亚洲精品| 久久精品a亚洲国产v高清不卡 | 亚洲日韩国产精品无码av| 国产成人高清精品免费鸭子 |