<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[concatenazione campi in più tabelle]]></title><description><![CDATA[<p dir="auto">Ciao a tutti.</p>
<p dir="auto">Dispongo di un db fatto di 3 tabelle: nella prima, ho un elenco di adattatori in mio possesso (con relativo id e nome), nella seconda ho due colonne nella quale associo gli id degli adattatori con quelli dei compatibili. (Ad esempio l'adattatore con ID 1 è compatibile con quello con ID 5).<br />
Ora: come posso impostare una query, in modo che dandogli ID 1, mi scarichi tutti gli id compatibili e vada a pescarsi nella prima tabella i relativi nomi?</p>
<p dir="auto">Grazie</p>
]]></description><link>https://dev.connect.gt/topic/206510/concatenazione-campi-in-più-tabelle</link><generator>RSS for Node</generator><lastBuildDate>Wed, 25 Nov 2026 21:59:04 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/206510.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Oct 2014 20:34:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to concatenazione campi in più tabelle on Mon, 13 Oct 2014 17:40:22 GMT]]></title><description><![CDATA[<p dir="auto">Occorre usare la funzione JOIN.</p>
<p dir="auto">Partendo dall'ipotesi di OsteriaORistorante dovrebbe essere:</p>
<pre><code>SELECT A.ID_ADA, A.NOME, C.ID_COMP, C.NOME
FROM TB_ADATTATORI AS A
JOIN TB_LINK_ADATT_COMPATIBILI AS B ON A.ID_ADA=B.ID_ADA
JOIN TB_COMPATIBILI AS C ON B.ID_COMP=C.ID_COMP
WHERE A.ID_ADA=1
</code></pre>
<p dir="auto">Da provare, comunque.</p>
]]></description><link>https://dev.connect.gt/post/1174296</link><guid isPermaLink="true">https://dev.connect.gt/post/1174296</guid><dc:creator><![CDATA[davello]]></dc:creator><pubDate>Mon, 13 Oct 2014 17:40:22 GMT</pubDate></item><item><title><![CDATA[Reply to concatenazione campi in più tabelle on Tue, 07 Oct 2014 11:03:28 GMT]]></title><description><![CDATA[<p dir="auto">Ciao,<br />
prova a vedere se può esserti di aiuto:</p>
<p dir="auto">Ipotizzando le tabelle:</p>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th><strong>TB_ADATTATORI</strong></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>ID_ADA</td>
<td>NOME</td>
</tr>
<tr>
<td>1</td>
<td>ADA_1</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td><strong>TB_LINK_ADATT_COMPATIBILI</strong></td>
<td></td>
</tr>
<tr>
<td>ID_ADA</td>
<td>ID_COMP</td>
</tr>
<tr>
<td>1</td>
<td>11</td>
</tr>
<tr>
<td>1</td>
<td>22</td>
</tr>
<tr>
<td><strong>TB_COMPATIBILI</strong></td>
<td></td>
</tr>
<tr>
<td>ID_COMP</td>
<td>NOME</td>
</tr>
<tr>
<td>11</td>
<td>COMP_1</td>
</tr>
<tr>
<td>22</td>
<td>COMP_2</td>
</tr>
</tbody>
</table>
<p dir="auto">la query che potresti utilizzare è:</p>
<p dir="auto">SELECT A.ID_ADA, A.NOME, C.ID_COMP, C.NOME<br />
FROM TB_ADATTATORI A, TB_LINK_ADATT_COMPATIBILI B, TB_COMPATIBILI C<br />
WHERE A.ID_ADA=B.ID_ADA<br />
AND B.ID_COMP=C.ID_COMP</p>
]]></description><link>https://dev.connect.gt/post/1174298</link><guid isPermaLink="true">https://dev.connect.gt/post/1174298</guid><dc:creator><![CDATA[osteriaoristorante]]></dc:creator><pubDate>Tue, 07 Oct 2014 11:03:28 GMT</pubDate></item><item><title><![CDATA[Reply to concatenazione campi in più tabelle on Mon, 06 Oct 2014 11:10:33 GMT]]></title><description><![CDATA[<p dir="auto">nella terza tabella cosa c'è invece?</p>
]]></description><link>https://dev.connect.gt/post/1174297</link><guid isPermaLink="true">https://dev.connect.gt/post/1174297</guid><dc:creator><![CDATA[pietror]]></dc:creator><pubDate>Mon, 06 Oct 2014 11:10:33 GMT</pubDate></item></channel></rss>