Fórum Ligar tabelas com inner join #507225
14/01/2015
0
select numeronf, valorcontabil
from LCTOFISENT
where chavelctofisent = 493
and codigoempresa = 465
and numeronf = 231
select codigocfop,valorcontabilimposto,outrasimposto
from LCTOFISENTCFOP
where chavelctofisent =493
and codigoempresa = 465
select codigoproduto,valortotal,isentasicms,outrasicms,valoripi
from LCTOFISENTPRODUTO
where chavelctofisent = 493
and codigoempresa = 465
Welison
Curtir tópico
+ 0Post mais votado
14/01/2015
select tb1.numeronf, tb1.valorcontabil, tb2.codigocfop,tb2.valorcontabilimposto,tb2.outrasimposto, tb3.codigoproduto,tb3.valortotal,tb3.isentasicms,tb3.outrasicms,tb3.valoripi from LCTOFISENT tb1 INNER JOIN LCTOFISENTCFOP tb2 ON (tb1.chavelctofisent = tb2.chavelctofisent AND tb1.codigoempresa = tb2.codigoempresa) INNER JOIN LCTOFISENTPRODUTO tb3 ON (tb1.chavelctofisent = tb3.chavelctofisent AND tb1.codigoempresa = tb3.codigoempresa) where tb1.chavelctofisent = 493 and tb1.codigoempresa = 465 and tb.1numeronf = 231
Ronaldo Lanhellas
Gostei + 1
Mais Posts
14/01/2015
Wander Santos
www.youtube.com/watch?v=C_OpAzDImfI
Gostei + 0
14/01/2015
Ronaldo Lanhellas
select tb1.numeronf, tb1.valorcontabil, tb2.codigocfop,tb2.valorcontabilimposto,tb2.outrasimposto, tb3.codigoproduto,tb3.valortotal,tb3.isentasicms,tb3.outrasicms,tb3.valoripi from LCTOFISENT tb1 INNER JOIN LCTOFISENTCFOP tb2 ON (tb1.chavelctofisent = tb2.chavelctofisent AND tb1.codigoempresa = tb2.codigoempresa) INNER JOIN LCTOFISENTPRODUTO tb3 ON (tb1.chavelctofisent = tb3.chavelctofisent AND tb1.codigoempresa = tb3.codigoempresa) where tb1.chavelctofisent = 493 and tb1.codigoempresa = 465 and tb.1numeronf = 231
Gostei + 0
14/01/2015
Welison
Gostei + 0
14/01/2015
Ronaldo Lanhellas
São alias para suas tabelas.
Gostei + 1
14/01/2015
Welison
DEU CERTO
OBRIGADO
Gostei + 0
14/01/2015
Ronaldo Lanhellas
DEU CERTO
OBRIGADO
De nada, disponha.
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)