Skip to main content
Inspiring
January 9, 2021
Question

QoQ OR Joins + Unions using junction table?

  • January 9, 2021
  • 1 reply
  • 201 views

Apologize in advance for not seeing the obvious query to get the result set I need, but a picture is worth...

Thanks for your advice.

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    January 9, 2021

    I cannot see how this is possible. The keys of the Name table (nameId, ownerId) are unrelated to those of the Spouse table (familyId, husbandId, wifeId).

    Inspiring
    January 9, 2021

    Thank you for your observation.

    I was sure that NameID (4000 individuals) in the Name Table equaled HusbandIDs (2000) & WifeIDs (2000) from the junction table. However, when I ran a simple query listing all, I realized that the junction table has bad data- no use at all.

    So I'm creating a new DB starting with one main table with all clean records.

    As long as your reading this, inserting values from DB1 ( #Request.BaseDSN1#)/existing table to DB2 (#Request.BaseDSN2#)/new table- can one do something like:

    <CFSET DB2 = #Request.BaseDSN2#>

    <CFSET DB3 = #Request.BaseDSN3#>

    INSERT INTO DB3.....etc

    SELECT ...etc

    FROM DB2?

    I do appreciate your time- I wish they had spell-check on the community support app- this is Adobe...