left join
Being new to coldfusin i have some question about this query .
why do we need the first select (joinquery) ?
is this a left join , just by looking at it it looks weird?
Is there other ways to do letf join in coldfusion?
<cfquery name="joinQuery" dbtype="query" >
SELECT *
FROM GetCardlyticsRedemptionStats
WHERE GetCardlyticsRedemptionStats.SourceCustomerIDINT = -1
</cfquery>
<cfset QueryAddRow(joinQuery) />
<cfquery name="CombineBothTables0" dbtype="query" >
SELECT *
FROM GetCardlyticsID, GetCardlyticsRedemptionStats
WHERE GetCardlyticsRedemptionStats.SourceCustomerIDINT = GetCardlyticsID.cardlyticscustomerid
UNION
SELECT GetCardlyticsID.*, joinQuery.*
FROM GetCardlyticsID, joinQuery
WHERE GetCardlyticsID.cardlyticscustomerid NOT IN (#ValueList(GetCardlyticsRedemptionStats.SourceCustomerIDINT)#)
</cfquery>
