orcale實現自定義優先順序排序的sql
select fchdno,
bom_id,
owner_id,
customer_id,
fcdate,
period,
fctrac,
market,
system_desc,
crt_type,
prod_model,
prod_chassis,
magnetic_field,
mcu_code,
f_pre_qty,
f_qty,
f_test_qty
from (with a as (select fh.fchdno,
fh.bom_id,
fh.owner_id,
fh.customer_id,
to_char(fi.fcdate, 'yyyy-mm-dd') fcdate,
'' period,
fi.fctrac,
fh.market,
fh.system_desc,
fh.crt_type,
fh.prod_model,
fh.prod_chassis,
'' magnetic_field,
fh.mcu_code,
fi.f_pre_qty,
fi.f_qty,
fi.f_test_qty
from t_fcst_header fh, t_fcst_item fi
where fh.fchdno = fi.fchdno
and fh.prod_model || fh.prod_chassis =
(select distinct prod_model || item_chassis
from mid_som_item_master
where item = 'h3-32p60b1-aacb0aa')
and fh.customer_id = '301428'
and to_char(fi.fcdate, 'yyyy-mm-dd') <= '2012-12-30')
select a.*, 1 seq
from a
where a.bom_id || a.owner_id || a.fcdate =
'h3-32p60b1-aacb0aa' || 'wunn' || '2012-12-30'
union
select a.*, 2 seq
from a
where a.bom_id || a.fcdate =
'h3-32p60b1-aacb0aa' || '2012-12-30'
and a.owner_id != 'wunn'
union
select a.*, 3 seq
from a
where a.bom_id || a.owner_id = 'h3-32p60b1-aacb0aa' || 'wunn'
and a.fcdate != '2012-12-30'
union
select a.*, 4 seq
from a
where a.fcdate || a.owner_id =
'2012-12-30' || 'wunn'
and a.bom_id != 'h3-32p60b1-aacb0aa'
union
select a.*, 5 seq
from a
where a.owner_id != 'wunn'
and a.bom_id != 'h3-32p60b1-aacb0aa'
and a.fcdate != '2012-12-30')
order by seq
測試優先順序定義
一級功能測試 業務場景測試 測試用例的優先順序用於標識測試用例的重要性和執行頻率,共分為4級,由高至低依次為p0 p3。p0核心功能測試用例 冒煙測試 確定此版本是否可測的測試用例,此部分測試用例如果fail會阻礙大部分其他測試用例的驗證。p1高優先順序測試用例,最常執行以保證功能性是穩定的 基本功...
bug優先順序定義
p.p1 p.p2 p.p3 span.s1 span.s2 優先順序定義如下 版本前期階段 功能剛提測 p0 緊急 完全不能滿足產品要求,基本功能明顯未實現或完全不可用,阻塞測試流程與進度 核心功能流程 p1 高 產品的功能實現和需求不符合,沒有達到預期的效果,但不阻塞測試進度 非核心功能流程,不...
STL 優先佇列 定義 優先順序
預設的優先佇列是個極大堆,如果要改變優先佇列中元素的優先順序,有下面這些方法 struct cmp1 struct cmp2 struct node2 int u bool operator const node2 a const return uq1 採用預設優先順序構造佇列 priority q...