I want to make a select that selects all the clients and next to it create two columns a carrier call and another provider and in each of them to mark yes or no.
Ex:
Código Nome Fornecedor Transportadora
01 João Sim Não
02 Maria Não Sim
I have the selects:
- carrier table:
select TraCod TR from T0055 TR, T0158 A where A.CliCod = TR.TraCod
- Vendor table
select * from T0185 F, T0158 A WHERE A.CliCod = F.ForCod
- customer table
select CliNom, CliReG, Clicgc, CliCgc2, CliNascCon, CliCid, CliCodUnf,
CliEnd, CliNum, CliBai, CliComple, CliCep, CliEmail, CliFon, CliFonCel
FROM T0158