twoplustwo
Registered User.
- Local time
- Yesterday, 23:12
- Joined
- Oct 31, 2007
- Messages
- 507
Hi guys,
I'm looking to run this pass through query and update a table with the values.
I keep getting an error on the FROM clause.
Any ideas?
I'm looking to run this pass through query and update a table with the values.
Code:
strSQL = "INSERT INTO tblInitialVolumes(SETTLEMENT_DATE, CONSUMPTION01, CONSUMPTION02)"
strSQL = strSQL & "SELECT FSD_SETTLEMENT_DETAILS.SETTLEMENT_DATE, FSD_SETTLEMENT_DETAILS.CONSUMPTION01, FSD_SETTLEMENT_DETAILS.CONSUMPTION02 "
strSQL = strSQL & "FROM FSD_SETTLEMENT_DETAILS"
strSQL = strSQL & "where SETTLEMENT_DATE between TO_DATE('" & dtDateFrom & " 00:00:00 ', 'DD MM YYYY HH24:MI:SS') "
strSQL = strSQL & "and TO_DATE('" & dtDateTo & " 23:59:59', 'DD MM YYYY HH24:MI:SS') "
'strSQL = strSQL & "GROUP BY SETTLEMENT_DATE"
Debug.Print strSQL
DoCmd.RunSQL strSQL
I keep getting an error on the FROM clause.
Any ideas?