赛捷软件论坛's Archiver

kakoo 发表于 2009-1-10 17:58

质量检查后的结果

<P>质量检查请求放在stoqlyh 和stoqlyd</P><P>那检查完的结果放在那里?</P><P>怎么在能找出来收货和质量检查结果的关系?.我想做这么个报表,谢</P>

tansj 发表于 2009-1-15 00:41

Re:质量检查后的结果

<P>提供一个思路,你可以试试:</P><P>收货单号有了,例如收货单号PRC0000020,</P><P>select * from stojou where vcrnum_0 =(select VCRNUM_0 from stoqlyh where VCRNUMORI_0=&#39;PRC0000020&#39; ) and sta_0 like &#39;A%&#39;;</P><P>--A状态的</P><P>select * from stojou where vcrnum_0 =(select VCRNUM_0 from stoqlyh where VCRNUMORI_0=&#39;PRC0000020&#39; ) and sta_0 like &#39;Q%&#39;;</P><P>--Q状态的</P><P>select * from stojou where vcrnum_0 =(select VCRNUM_0 from stoqlyh where VCRNUMORI_0=&#39;PRC0000020&#39; ) and sta_0 like &#39;R%&#39;;</P><P>--R状态的</P><P>即通过收货号到stoqlyh中找到质量控制单号VCRNUM_0,再通过质量控制单号到日记中找到详细信息。</P><P>------以上在X3V5&amp;Oracle 9.2.0.4中测试通过。</P><p>[此帖子已被 tansj 在 2009-1-14 16:46:32 编辑过]

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.