Question
query problem with date range
I have a query that needs to pull data between a date range.
I've tried several things and nothing seems to work.
Any help would be greatly appreciated.
Here's the code:
<cftransaction>
<cfquery name="QryFollowUp" datasource="NBProdReports">
SELECT TblContractInfo_SubMenuTable.User_ID, TblContractInfo_SubMenuTable.Contract_Number, TblContractInfo_SubMenuTable.Transaction_Type, TblContractInfo_SubMenuTable.Notes, TblContractInfo_SubMenuTable.Num_Checks_Trans, TblMasterTrans.Date_Opened
from TblContractInfo_SubMenuTable ,tblMasterTrans
WHERE Transaction_Type = 'FollowUp'
And TblContractInfo_SubMenuTable.Task_Number = tblMasterTrans.Task_Number
And TblMasterTrans.Date_Opened BETWEEN #form.StartDate# AND #form.EndDate#
ORDER BY TblMasterTrans.Date_Opened ASC, TblContractInfo_SubMenuTable.User_id ASC
</cfquery>
</cftransaction>
Any help would be greatly appreciated.
Here's the code:
<cftransaction>
<cfquery name="QryFollowUp" datasource="NBProdReports">
SELECT TblContractInfo_SubMenuTable.User_ID, TblContractInfo_SubMenuTable.Contract_Number, TblContractInfo_SubMenuTable.Transaction_Type, TblContractInfo_SubMenuTable.Notes, TblContractInfo_SubMenuTable.Num_Checks_Trans, TblMasterTrans.Date_Opened
from TblContractInfo_SubMenuTable ,tblMasterTrans
WHERE Transaction_Type = 'FollowUp'
And TblContractInfo_SubMenuTable.Task_Number = tblMasterTrans.Task_Number
And TblMasterTrans.Date_Opened BETWEEN #form.StartDate# AND #form.EndDate#
ORDER BY TblMasterTrans.Date_Opened ASC, TblContractInfo_SubMenuTable.User_id ASC
</cfquery>
</cftransaction>