erikTsomik
asked on
coldFusion QoQ problem
I am trying to write the QofQ and it cause me an error message
<cfquery name="getContigSessionAfterDelete" dbtype="query" >
SELECT *
FROM qGetResult as a
JOIN (SELECT carKey, min(sessionStart) AS minStart, max(sessionEnd) AS maxEnd
FROM qGetResult
WHERE 1 IN (contiguous)
GROUP BY carKey) c
ON c.carKey = a.carKey
AND ( a.sessionStart BETWEEN DATEADD(n, -29, maxEnd) AND DATEADD(n, 29, maxEnd)
OR a.sessionEnd BETWEEN DATEADD(n, -29,minStart) AND DATEADD(n, 29, minStart) )
</cfquery>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SELECT *
FROM qGetResult as a
JOIN (SELECT carKey, min(sessionStart) AS minStart, max(sessionEnd) AS maxEnd
FROM qGetResult
WHERE 1 IN (contiguous)
GROUP BY carKey) c
ON c.carKey = a.carKey
WHERE ( a.sessionStart BETWEEN DATEADD(n, -29, maxEnd) AND DATEADD(n, 29, maxEnd)
OR a.sessionEnd BETWEEN DATEADD(n, -29,minStart) AND DATEADD(n, 29, minStart) )