create view View_count as
SELECT spkfk.spid, pf_ckmx.rq, pf_ckmx.spid AS Expr1, pf_ckmx.shl, spkfk.spbh, spkfk.spmch, pf_ckmx.djbh
FROM ksoa.dbo.spkfk INNER JOIN
SELECT spkfk.spid, pf_ckmx.rq, pf_ckmx.spid AS Expr1, pf_ckmx.shl, spkfk.spbh, spkfk.spmch, pf_ckmx.djbh
FROM ksoa.dbo.spkfk INNER JOIN
ksoa.dbo.pf_ckmx ON ksoa.dbo.spkfk.spid = ksoa.dbo.pf_ckmx.spid where ksoa.dbo.pf_ckmx.djbh not like 'xsB%' and rq>'2014-01-01'
create view View_client as
select '' as 机构编码,'' as 机构名称,spbh as 产品编码,
spmch+'/'+tongym as 产品名称, caigr as 采购人,
shpdengji as 产品等级,
case when is_jkyp='否' then '国产' else '进口' end as 产品类型,
fukuanq as 付款天数, fukuansm as 付款方式,jhshlv as 进项税率,
shlv as 销项税率,leibie as 产品分类
FROM ksoa.dbo.spkfk where beactive='是'
If opportunity doesn’t knock, build a door