0
I basically have these relationships:
I would like to take the value of the attribute "im_fab_template" of the table "tblImpressora" the code of the attribute "is_cod_printer" of the table "tblImpressoraSetor", someone can help me?
For now I have this select:
SELECT tblTonerEntSai.es_cod_toner_ent_sai, tblToner.tn_modelo, tblSetor.st_nome,
tblImpressoraSetor.is_cod_impressora, tblImpressoraSetor.is_siap, tblTonerEntSai.es_entrada_saida,
tblTonerEntSai.es_quantidade, tblTonerEntSai.es_solicitante FROM tblTonerEntSai
INNER JOIN tblToner ON (tblTonerEntSai.es_cod_toner = tblToner.tn_cod_toner)
INNER JOIN tblSetor ON (tblTonerEntSai.es_cod_setor = tblSetor.st_cod_setor)
INNER JOIN tblImpressoraSetor ON (tblTonerEntSai.es_cod_impressora_setor = tblImpressoraSetor.is_cod_imp_setor)
The same returns me the following data:
<table>
<tr>
<th>es_cod_toner_ent_sai</th>
<th>tn_modelo</th>
<th>st_nome</th>
<th>is_cod_impressora</th>
<th>is_siap</th>
<th>es_entrada_saida</th>
<th>es_quantidade</th>
<th>es_solicitante</th>
</tr>
<tr>
<td>1</td>
<td>MODELO DA IMPRESSORA<br></td>
<td>NOME DO SETOR<br></td>
<td>3<br></td>
<td>0000.0000<br></td>
<td>09/07/2016<br></td>
<td>4<br></td>
<td>DEIVIDY<br></td>
</tr>
</table>
Note: I don’t want to create a new relationship.
I think you could go into more detail, trying to understand here.
– Christian Felipe