Note that there are some explanatory texts on larger screens.

plurals
  1. POCombining two queries - how?
    primarykey
    data
    text
    <p>I have the following queries:</p> <p>Query 1: </p> <pre><code>Select * from T10,T11,T12,T13,T14 where T10.C0 = T11.C0 and T11.C1 = T12.C0 and T12.C1 = T13.C0 and T13.C1 = T14.C0; </code></pre> <p>Query 2:</p> <pre><code>Select * from T20,T21,T22,T23,T24 where T20.C0 = T21.C0 and T21.C1 = T22.C0 and T22.C1 = T23.C0 and T23.C1 = T24.C0; </code></pre> <p>How can I combine these 2 queries to show all the values of these tables? I want the join to be on <code>T10.C1 = T20.C1</code>.</p> <p>When trying <code>union</code> I get a warning about not having the same number of columns, which is true, these tables are not the same</p> <hr> <p><strong>union</strong></p> <pre><code>Select * from "ProductConfig","Board","PcbBuild","Model","TcssCalib" where "Model"."idModel" = "PcbBuild"."Model" and "Board"."PcbBuild" = "PcbBuild"."idPcbBuild" and "Board"."idBoard" = "TcssCalib"."Board" and "ProductConfig"."TcssCalib" = "TcssCalib"."idTcssCalib" union Select * from"ProductBuild","TxResultsLink","TxResults","DspValues" where "ProductBuild"."idProductBuild" = "TxResultsLink"."ProductBuild" and "TxResults"."idTxResults" = "TxResultsLink"."TxResults" and "TxResults"."DspValues" = "DspValues"."idDspValues"; </code></pre> <p>here i want ProductBuild.Productconfig joined with ProductConfig.idProductConfig</p> <p>gives an error:</p> <p>[Err] ERROR: each UNION query must have the same number of columns</p> <hr> <p>When I try <code>inner join</code> I get a syntax error at or near <code>inner</code> </p> <p>Is there a way to join these 2 queries together?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload