惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
人人都是产品经理
人人都是产品经理
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog
MongoDB | Blog
MongoDB | Blog
L
LangChain Blog
WordPress大学
WordPress大学
小众软件
小众软件
IT之家
IT之家
腾讯CDC
月光博客
月光博客
量子位
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 老狐狸

关于Update语句在不同数据库中的差别 出错存储过程 F_GETTABLELID 正则表达式求值 - 老狐狸 - 博客园 创建层次查询 ultrawebgrid - 老狐狸 - 博客园 javascript - 老狐狸 - 博客园 case when用法和and 后加条件 exp/imp导出导入工具的使用 ASP.NET1.1中Grid自定义眉头 asp.net1.0 TreeView asp.net2.0 TreeView 关闭远程数据库连接 创建游标 创建新的序列 创建隐式游标 创建临时表 更新表(多表相关联)
创建记录、数组
老狐狸 · 2006-06-16 · via 博客园 - 老狐狸

--创建记录

TYPE REC_PERSON IS RECORD(
    PersonSID  varchar2(50),
    PersonName varchar2(60),
    Gender     varchar2(10),
    DepartSID  varchar2(50),
    IsSaler    char(1),
    IsAgent    char(1),
    IsDeliver  char(1),
    IsStorman  char(1),
    IsActive   char(1));
   
  R_PERSON REC_PERSON;

--创建数组
  TYPE TABLE_PERSON IS TABLE OF REC_PERSON
  INDEX BY BINARY_INTEGER;
 
  table_person_list TABLE_PERSON;

i:= 1;
  while i <= table_person_list.count LOOP

    R_PERSON := table_person_list(i);

END LOOP;

--PickStatusGather:记录,t_BorrowID 为记录中的数组

forall i in 1 .. r_PickStatusGather.t_BorrowID.count
      update LPMS.PIK_PickStatusGather
         set BeginTime = r_PickStatusGather.t_PickBeginTime(i),
             EndTime   = r_PickStatusGather.t_PickEndTime(i),
             UseTime   = r_PickStatusGather.t_PickUseTime(i)
       where BorrowID = r_PickStatusGather.t_BorrowID(i);
 
    r_PickStatusGather.t_BorrowID.delete;
    r_PickStatusGather.t_PickBeginTime.delete;
    r_PickStatusGather.t_PickEndTime.delete;
    r_PickStatusGather.t_PickUseTime.delete;
 
    --从分拣调度表中更新分拣班组ID
    select distinct t1.BorrowID, t2.PickTeamID bulk collect
      into r_PickStatusGather.t_BorrowID, r_PickStatusGather.t_PickTeamID
      from LPMS.PIK_PickStatusGather t1,
           LPMS.PIK_PickTeamAttemper t2,
           LTMP.TT_PIK_Borrow        t3
     where t1.ShelfID = t2.ShelfID
       and t1.BeginTime between t2.BeginTime and t2.EndTime
       and t1.BorrowID = t3.BorrowID;