-
pastebin.com выдает сцуко Msg 4104, Level 16, State 1, Line 1Жуйк, что не так с запросом
The multi-part identifier "cr.id" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "cr.ShortName" could not be bound.
Replies (9)
-
@gabas, Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "cr.MatPath" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "cr.ShortName" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "cr.ShortName" could not be bound. -
@gabas, Вот в таком порядке работает select cr.ShortName, SUM(DocDetail.PriceRelis*DocDetail.Quantity)
FROM Contragents cr INNER JOIN Contragents on (Contragents.MatPath like cr.MatPath+'.%')
LEFT JOIN DocHeaders on DocHeaders.Client=Contragents.id
INNER JOIN DocDetail ON DocHeaders.ID=DocDetail.id
group by cr.ShortName