i am currently having issues with the following left join select. the dateadd and the current timestamp are included in the selection to filter out the results but obviously it would not work as the logic dictates because the tables return null for all joins! attached you would find an xsl workbook with a page for the Faulty Query
, as well as the individual tables selecting from.
CURRENT_TIMESTAMP AS CURDATE,
INTERVAL ST.tinyint_ResendInterval DAY
) AS OFFDATE,
LEFT JOIN (
) ON (
CS.bigint_ConsumerID = C.bigint_ConsumerID AND
CS.bigint_LeadID = SL.bigint_LeadID AND
CS.bigint_ReferenceID = SP.bigint_ProspectID AND
CS.bigint_SurveyType = ST.bigint_SurveyID
the where part of the statement is supposed to look as follows:
OFFDATE <= CURDATE AND
CS.tinyint_SurveyStatus = 0;
please tell me if you can see the issue, i do not seem to find a resolution here...