Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 4729

Msg 208, Level 16, State 1, Line 3 Invalid object name 'enc'.

$
0
0

Boa tarde,

Necessito de ajuda, pois não consigo encontrar razão para o erro.

Obrigada

select * 
from
(select distinct BIFREF as 'cotação',bo.nmdos as 'Doc', bo.obrano as 'nr', bo.dataobra as 'Data',sum(bi.ETTDEB) as 'Total enc'
from bo (nolock),bi (nolock) 
where 
bi.nmdos ='ENC. A FORNECEDOR'
and
bi.bostamp=bo.bostamp     
and
ref <> ' ' 
and
bifref='005/2014'
group by BIFREF,bo.nmdos, bo.obrano, bo.dataobra) enc

left outer join

(select enc.cotação,enc.Doc, enc.nr, enc.Data,sum(guial.ETTDEB) as 'Total Guia'
from  enc (nolock),bi as guial (nolock)
where 
enc.nmdos ='GUIA DE ENTREGA FORN'
and
guial.bostamp = enc.bostamp     
and
guial.ref <> ' ' 
and
guial.bifref='005/2014') guia
on 
guia.TPSTAMP = enc.TPSTAMP

group by enc.obrano,enc.nmdos,enc.dataobra

order by enc.obrano,enc.nmdos,enc.dataobra

Msg 208, Level 16, State 1, Line 3
Invalid object name 'enc'.


Viewing all articles
Browse latest Browse all 4729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>