查询语句
<p>1.期初表 期初数量查询
select n_qmsjkcsl, n_qmzsl,m_qmzcb,m_qmzje,* from g_lastkcqc where shopid='32048301' and monthflag='201609' and code in ('0A050966M-03','AX031966M-03','DV050801M-03','DZ050744M-04','ED032349L-06','EM050808M-03','HC051062M-01','AX031966M-03')</p>
<p>2.商品 规则对应查询 g_spdmspec
select a.code,b.sizeno, b.n_lieh from g_spdm a ,r_size b where a.sizegrpid=b.groupno and a.code='1BRB630181' g_spdmdtl select a.code||'-'||c.colorid ||'-'||b.sizeno as prodcode , a.code,c.colorid ,b.sizeno, b.n_lieh from g_spdm a ,r_size b ,g_spdmdetail c where a.sizegrpid=b.groupno and a.code='914502009' and a.code=c.code g_barcode select code,codename,'1','01',sale from g_spdm
g_barcodedetail select a.code,c.colorid ,b.sizecode ,b.sizecode,'01','1',a.code||c.colorid||b.sizecode from g_spdm a ,r_size b ,g_spdmdetail c where a.sizegrpid=b.groupno and a.code='1BRB630181' and a.code=c.code ORDER BY code ,colorid,sizecode</p>
<p>3.期初查询
select * from g_lastkcqc where companyid ='44888'and monthflag ='201608' limit 10</p>
<p>4.查看商品资料商品组
select C_SPECIALBH ,COUNT(*) from g_spdm where C_SPECIALBH<>'' GROUP BY C_SPECIALBH</p>