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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie needs help with insert / pass - through query

Status
Not open for further replies.
Oct 18, 2001
16
US
I have written an Access SQL Pass Through Query to an Oracle table and I get the ORA 00936 Missing Error Expression message. I know there is some offending element in the SQL statement, but I'm at a loss as to what it is.

Any suggestions? Here is my code:

INSERT INTO MASTER_SALES ( PI_BU_ID, PROD_ATTRIB01_CD, X_ROLLOVER_STATUS, ROW_ID, PAR_PROD_INT_ID, ISBN, ITEM_CD, TITLE, AUTHOR, OP_PROD_id, OP_OU_ID, OP_XTERR, YR1, YR2, YR3, YR4, YR5, CURRYR, NEWEDSALES, TOTAL, OE_ROW_D, ACCT_NAME, OE_BU_ID, AD_CITY, AD_STATE, SAMP_QTY, SAMP_ORD_NUM, SAMP_TERR_ID, CN_ROW_ID, CN_FIRST, CN_LAST, CN_EMAIL )

SELECT [big sql].PI_BU_ID, [big sql].PROD_ATTRIB01_CD, [big sql].X_ROLLOVER_STATUS, [big sql].PI_ROW_ID, [big sql].PAR_PROD_INT_ID, [big sql].NAME, [big sql].X_ITEM_CD, [big sql].ALIAS_NAME, [big sql].PART_NUM, [big sql].PROD_ID, [big sql].OP_OU_ID, [big sql].X_TERR, [big sql].X_1YR_AGO_SALES, [big sql].X_2YR_AGO_SALES, [big sql].X_3YR_AGO_SALES, [big sql].X_4YR_AGO_SALES, [big sql].X_5YR_AGO_SALES, [big sql].X_CURR_YR_SALES, [big sql].X_NEW_EDITION_SALES, [big sql].X_TOTAL, [big sql].OE_ROW_ID, [big sql].ACCT_NAME, [big sql].OE_BU_ID, [big sql].CITY, [big sql].STATE, [big sql].X_QTY, [big sql].X_JDE_ORDER_NUM, [big sql].X_TERR_ID, [big sql].CN_ROW_ID, [big sql].FST_NAME, [big sql].LAST_NAME, [big sql].EMAIL_ADDR
FROM [big sql];
 
Nothing jumps out. One method I like to use to identify problems like this is to try to insert a value list first and if that works go back to your original insert query but add the fields one at time (if constraints prohibit this then use literals for the other fields replacing them with your sql columns one by one) until you find the rotten apple spoiling the whole bunch. JHall
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top