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

Update concept craters

Status
Not open for further replies.

scottshiv

MIS
Sep 13, 2002
47
US
I have several update queries that all update the same field and I couldn't figure out how to combine them, so I came up with the idea of creating a separate cross reference table. The idea was to join the tables on the provider field and then replace the current provider in the provider table with the provider value in the Xref table. One of the advantages of this was I only had to pass the master database one time. Well, the new query runs until the end of time and does nothing.

Xref Table Fields
Clinic
Master

Provider Table field
Provider

Join both tables on Clinic = Provider

Update [Provider]![Provider] to [Xref]![Master]

I was doing all of this from the design view screen. At first the screen would not let me drag and drop the Xref provider into the Update to field on the design view screen, so I typed [Provider Xref]![Master] in there and let her rip. Jesus will come back before my job finishes. What am I missing here?
 
Here is the SQL code. I can't see anything wrong with it but it never goes to end of job. Could the problem be that the field being updated is also the join field?

UPDATE [Title XX test] INNER JOIN [Provider Xref] ON [Title XX test].Provider = [Provider Xref].Clinic SET [Title XX test].Provider = [Provider Xref].[Master];
 
In order to update the Provider table, unless you want to update every record in Provider, you need to establish some sort of relationship of the Provider table to at least one of the following tables (Title XX Test] or [ProviderXref]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top