select distinct b.pihao,a.jigid,a.djbh,c.spid,c.spbh,c.spmch,b.pihao,c.dw,c.shpgg,c.shengccj
,b.jwhname,b.hwname,b.pihao,b.sxrq,d.ckname,c.pizhwh
from (select spid,pihao,pici,djbh from
(
select row_number() over(partition by spid,pihao order by pici) 編號,* from yw_jxmx where djbh like 'jhe%'
) t
where t.編號='1')tt
inner join yw_jxhz a on tt.djbh=a.djbh
inner JOIN YW_JXMX b(nolock) ON a.djbh = b.djbh and tt.spid=b.spid
inner JOIN spzl_v c(nolock) ON b.spid = c.spid and a.jigid=c.jigid
inner JOIN zl_ckzl d(nolock) ON b.ckid = d.ckid
inner join zl_jwhzl e(nolock) on b.ckid=e.ckid and b.hwid=e.hwid and b.jwhid=e.jwhid
where a.jigid='000'
order by c.spid
查詢陳述句如上,但是我每次點擊執行查詢,查詢的結果的行數都會變化,是一個單獨的資料庫,,,為什么同一個查詢陳述句會出現這種情況啊
uj5u.com熱心網友回復:
你這個庫沒有其它人在用?uj5u.com熱心網友回復:
是不是資料有在修改uj5u.com熱心網友回復:
沒有其他在用的,這個資料庫是我還原的一個測驗用的備份的資料庫,就我一個人在使用,我執行查詢是等查詢完成就馬上再次點擊執行,然后查出來的資料行數就會變化uj5u.com熱心網友回復:
是不是yw_jxmx這個表里的pici有重復的。uj5u.com熱心網友回復:
批次是沒得重復的,他是根據日期+商品條數,比如今天開了一張單據,里面3條資訊,2019111900001,2019111900002,2019111900003,這樣生成轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/105970.html
標籤:基礎類
上一篇:計算球體積
下一篇:菜鳥邏輯回歸復現
