Unanswered: Inserting data from SQL pass thru to Access Table
I have a set of PassThru Queries into Oracle Dbase which work fine as is.
I want to append the output of these queries into a table in the Access Db the pass thrus run from
I'm getting an error 'ORA00926 - missing VALUES keyword' with the code I'm using - have you any suggestions please
INSERT INTO WEEKDATA ( REG_KEY, REG_TYPE, DAY, REGCRS, STUCRS, RPROG, PERSON, WK, MARK, DUR, WDATE, STIME, ETIME ) IN 'C:\register\2008-9\Attendance\week_parse.mdb',
RM.SBJ_CODE_P AS REGCRS,
SR.SBJ_CODE_P AS STUCRS,
SR.REG_PRG_TYPE AS RPROG,
SR.PERSON_CODE AS PERSON,
1 AS WK,
SR.ATT_TYPE_01 AS MARK,
SR.DURATION_01 AS DUR,
TO_CHAR(R1.DATE_01,'DD/MM/YYYY') AS WDATE,
TO_CHAR(R1.START_01,'HH24:MI') AS STIME,
TO_CHAR(R1.END_01,'HH24:MI') AS ETIME
WHERE ID.PARAMETER = 'DEFAULT_REG_SESSION' AND ID.PARAMETER_VALUE = RM.SESSION_CODE AND RM.REG_KEY = SR.REG_KEY AND SR.REG_KEY = R1.REG_KEY;
Well you lost me with that code. What I do with PassThru queries is to have a separate append query in Access that uses the PassThru. When you create the append query just select the query you want to base the results to be appended.
Does that make sense? As long as the PassThru works wrapping that query into an Access Append query should work as well.