开松工艺单——pb查询子窗口中下拉列表控件赋值;两张表左连接显示其中部分数据;数据窗口单元格布局设置

发布时间 2023-06-05 18:17:01作者: 孟伟龙

说明:此查询窗口为继承窗口

开松工艺单来自两张表时其中一张表没有数据也要显示部分数据时,可以使用左连接,如下

 1  select  a.waste_lot, 
 2         a.qua_name, 
 3         a.color_name, 
 4         a.qty,
 5         a.remark,
 6          Case a.prod_type  when 'C' then '粗纺' when 'H' then '康宝莱' when 'J' then '精纺' when 'B' then '半精纺'  end as prod_type,
 7         a.t_name,
 8         a.open_craft,
 9         c.item_name,
10         c.item_rate,
11         c.qty rate_qty,
12         a.trans_date,
13         a.trans_user
14  from 
15     csn_waste_open_order_dtl a left join csn_oil_open_rate c 
16  on a.order_id = c.order_id 
17     where a.order_id = :al_id