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

What to use In the Update To cell?

Status
Not open for further replies.

Valeriya

MIS
Jan 9, 2006
138
US
I have two tables joined on the Item number field in Query:

000000 Cons Request History dbo_ItmMstr
Account Item
Division Description
product Description2
Quantity MinorCls
Item MajorCls
InvMajCls PriceSize

1.InvmajCls should be equal to MajorCls(by Item)
2.[000000 Cons Request History].[InvMajCls]needs to be updated, anotherwords for every different[InvMajCls] needs to be replaced with a new value from [dbo_ItmMstr].[MajorCls]

Here is a code, that for some reason is not working:

Code:
UPDATE [000000 Cons Request History] LEFT JOIN dbo_JDE_ItmMstr ON [000000 Cons Request History].Item = dbo_JDE_ItmMstr.Item SET [000000 Cons Request History].InvMajCls = [dbo_JDE_ItmMstr].[MajorCls]
WHERE ((([000000 Cons Request History].InvMajCls)<>[dbo_JDE_ItmMstr].[MajorCls]));

And I'm a little bit confused:
What should I use In the Update To cell? "From" Table or "To" Table? I mean,the destination Table.Field or the source table.Field?

Please advise,
And thank you in advance, Guys!

 
In your previous post on the SAME subject I gave you an answer with an INNER join and you said it's not working without helpful explanation.
So, please, Red Flag yourself this thread as a duplicate one and elaborate on your reply in the original thread.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top