Он у меня имеет вот такой вид
Код: Выделить всё
create view vKatsoprNakl
var
NameMVZ : string;
MarkPodr,indexno : longint;
dfrom,dto:date;
Vyvod: word;
select katsopr.nsopr,katsopr.dsopr,katpodrfrom.name,katpodrto.name,katsopr.descr,katsopr504.nsopr,katmc504.name,katmc504.barkod,
kated504.name,spsopr504.kol,katparty504.name,spsopr504.price,spsopr504.kol*spsopr504.price
from katsopr,katsopr katsopr504,katpodr,katpodr katpodr1,spsopr spsopr504,katmc katmc504,kated kated504,
katparty katparty504,pick PickPodr,katpodr katpodrfrom, katpodr katpodrto
where ((
dfrom <<=katsopr.dsopr (noindex)
and dto >>=katsopr.dsopr (noindex)
and 281474977139762 ==katsopr.cpodrfrom (noindex)
and katsopr.nrec /==katsopr504.ckatsopr
and katsopr.cpodrto==katpodrfrom.nrec
and katsopr.cpodrfrom==katpodrto.nrec
and katsopr504.nrec==spsopr504.csopr (noindex)
and SPSOPR504.CMCUSL==KATmc504.NREC
and katmc504.ced==kated504.nrec
and spsopr504.cparty==katparty504.nrec
));
Если ставлю условие
Код: Выделить всё
Condition NGP 502=katsopr.vidsopr
Condition Aktuslugi 508=katsopr.vidsopr