|
create view v_all
as
select wzlb = left (wzdm, 2),
rkje = sum (je),
ckje = 0,
fsrq = rksj,
kcje = 0
from materials and materials
union all
select wzlb = left (Received by labor insurance supplies units.wzdm, 2),
rkje = 0,
ckje = sum (laboratory supplies.je) + sum (laboratory supplies.je),
fsrq = Received by labor insurance units. bgyqrsj,
kcje = 0
from Labor insurance supplies, personal insurance supplies
where Labor insurance supplies for personal use. wzdm = Labor insurance supplies for personal use. wzdm and Labor insurance supplies for personal use. bgyqrsj = Labor insurance supplies for personal use. bgyqrsj
union all
select wzlb = left (wzdm, 2),
rkje = 0,
ckje = 0,
fsrq = null,
kcje = dj * sl
from inventory
Running the above code in the Query Analyzer fails to pass the query.
Server: Message 207, Level 16, State 3, Process v_all, Line 4
Column name 'je' is invalid. |
|