返回列表 发帖

质量检查后的结果

质量检查请求放在stoqlyh 和stoqlyd

那检查完的结果放在那里?

怎么在能找出来收货和质量检查结果的关系?.我想做这么个报表,谢

Re:质量检查后的结果

提供一个思路,你可以试试:

收货单号有了,例如收货单号PRC0000020,

select * from stojou where vcrnum_0 =(select VCRNUM_0 from stoqlyh where VCRNUMORI_0='RC0000020' ) and sta_0 like 'A%';

--A状态的

select * from stojou where vcrnum_0 =(select VCRNUM_0 from stoqlyh where VCRNUMORI_0='RC0000020' ) and sta_0 like 'Q%';

--Q状态的

select * from stojou where vcrnum_0 =(select VCRNUM_0 from stoqlyh where VCRNUMORI_0='RC0000020' ) and sta_0 like 'R%';

--R状态的

即通过收货号到stoqlyh中找到质量控制单号VCRNUM_0,再通过质量控制单号到日记中找到详细信息。

------以上在X3V5&Oracle 9.2.0.4中测试通过。

[此帖子已被 tansj 在 2009-1-14 16:46:32 编辑过]

TOP

返回列表