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 -Missing Expression

Status
Not open for further replies.

tledwards

Programmer
Feb 4, 2003
86
US
When the following query is run the Ora-00936 Missing expression error message appears. What is missing?

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

Thanks for your help.

Terry
 
I reacll I used to preceeded everything with the instance name... i think... Also look like u left off ")" at end of line.

INSERT INTO
OLAP_OWNER.SDW_LD_DATA
(OLAP_OWNER.SDW_LD_DATA.ADMIN_BY_CAO,
OLAP_OWNER.SDW_LD_DATA.PRIME_CAGE,
OLAP_OWNER.SDW_LD_DATA.PIIN)
VALUES
(SELECT OLAP_OWNER.CONTRACTS.ADMIN_BY_CAO,
OLAP_OWNER.CONTRACTS.PRIME_CAGE,
OLAP_OWNER.CONTRACTS.PIIN
FROM OLAP_OWNER.CONTRACTS
WHERE OLAP_OWNER.CONTRACTS.ADMIN_BY_CAO ='YL')
Steve Medvid
"IT Consultant & Web Master"
e-Mail: Stephen_Medvid@GMACM.com

Chester County, PA Residents
Please Show Your Support...
 
Steve,
I should have given you more information. I am importing into an Access datagase, Admin200.mdb. I want the Pass Through query to pull data from an Oracle server and apend to table SDW_LD_Data. I tried with and without the closing ")". It did not give an error message ether way. It did without an opening "(".

I tried adding the table name in front of all the field names in the in sert to list but that did not work. I have not tried to enter the database name infront of the table name but will if you think that might help.

The select part work as it is written with out the database name just as a selection query.

Thanks,
Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top