Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass through query SQL problem

Status
Not open for further replies.

tledwards

Programmer
Feb 4, 2003
86
US
I am going to a Oracle database from an Access database and want to append records to a table in the Access database.
I need about 40 fields but here is an example of just three.

INSERT INTO
ADMIN200.SDW_LD_DATA
(SDW_LD_DATA.ADMIN_BY_CAO, SDW_LD_DATA.PRIME_CAGE, SDW_LD_DATA.PIIN)
VALUES
(SELECT CONTRACTS.ADMIN_BY_CAO, CONTRACTS.PRIME_CAGE, CONTRACTS.PIIN
FROM OLAP_OWNER.CONTRACTS
WHERE CONTRACTS.ADMIN_BY_CAO ='YL')

With this format I get a missing expression error.

Can any body help?

Thanks,
Terry
 
Usually in this situation, I would make a pass-through select query, then create an append query to the Access table based on that pass-through. This would still be much quicker than having the normal (non pass-through) Access append query.

I believe what is happening is that the SQL code is being performed by Oracle, and therefore it can't find the Access table being referred to.

Rob
 
Rob,
Thanks! That worked great. It was getting the error message after signing on to the Oracle database.

Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top