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

Question regarding Joins... (invalid join)

Status
Not open for further replies.

MAKNIGHT71

IS-IT--Management
Sep 25, 2003
67
US
Hi. Let me explain what I am looking to do by first explaining what I have:

1 linked Excel Spreadsheet with "Item Numbers" in the F1 field. The rest of the data is extraneous. Linked table name: FG No Usage Report

1 linked ERP program database table (Progression SQL 7) with Item_No" and "Activity_Cd" fields. The rest of the data is extraneous. Linked table name: IMITMIDX_SQL

I want to set the "Activity_Cd" field in the ERP program table to the letter 'O' for every item in the F1 field of the Excel spreadsheet.

I have tried doing a join, but I am missing something because I get an invalid join error. I'll admit that I am VERY weak with joins. Here is the statement as I have it presently:

DoCmd.RunSQL "UPDATE IMITMIDX_SQL INNER JOIN [FG No Usage Report] ON IMITMIDX_SQL!F1 = [FG No Usage Report].Item_No " & _
"Set IMITMIDX_SQL!Activity_Cd = 'O';", 0


Thanks.

 
Oops! That sample statement should have been:

DoCmd.RunSQL "UPDATE IMITMIDX_SQL INNER JOIN [FG No Usage Report] ON IMITMIDX_SQL!Item_No = [FG No Usage Report].F1 " & _
"Set IMITMIDX_SQL!Activity_Cd = 'O';", 0

Thanks...

maknight71
 
Doh!! After looking at it for the trillionth time I saw my tiny mistake...

IMITMIDX_SQL!Item_No

Should read:

IMITMIDX_SQL.Item_No

Oh well... Maybe I need to go get a drink and take a short break.

maknight71
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top