QoQ OR Joins + Unions using junction table?

Community Beginner ,
Jan 09, 2021 Jan 09, 2021

Copy link to clipboard

Copied

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

desired.jpg

Thanks for your advice.

Views

73

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 09, 2021 Jan 09, 2021

Copy link to clipboard

Copied

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).

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 09, 2021 Jan 09, 2021

Copy link to clipboard

Copied

LATEST

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...

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines