merlynsdad
Programmer
I'm moving data from Oracle to Access via vba, and am having trouble with a WHERE stmt. The code basically says:
db.execute "INSERT INTO LOCALTBL (fields) " _
& "SELECT ORACLEFIELDDATE As [Date], " _
& "ORACLEFIELDVARIOUS, " _
& "FROM ORACLETABLE " _
& "WHERE "ORACLEFIELD.DATE > LOCALFIELD.DATE;"
Everything works fine until I get to the WHERE clause. This had a hard coded date, but we're going to use a date in a local table date instead. And that's where the error pops up. It's saying I have too few parameters in the WHERE clause, and I don't know what I'm missing.
If the square peg won't fit in the round hole, sand off the corners.
db.execute "INSERT INTO LOCALTBL (fields) " _
& "SELECT ORACLEFIELDDATE As [Date], " _
& "ORACLEFIELDVARIOUS, " _
& "FROM ORACLETABLE " _
& "WHERE "ORACLEFIELD.DATE > LOCALFIELD.DATE;"
Everything works fine until I get to the WHERE clause. This had a hard coded date, but we're going to use a date in a local table date instead. And that's where the error pops up. It's saying I have too few parameters in the WHERE clause, and I don't know what I'm missing.
If the square peg won't fit in the round hole, sand off the corners.