Full Version: Append query - anomaly
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
likajoho
I have an append query that has been working fine, up until now.

A few weeks ago I added another field to it. Now that field is picking up the information from a different field. I can't figure out how or why.

I've checked the table I am using as the source. The information is correct there. I've checked the append query, and it looks fine, until you run it or view it in datasheet view. The interesting thing is that it is picking up the information from another field that is a look-up field in the destination table.

The source table is "ImportedList". The destination table is "Addresses". The field messing up is "FTType".

"AddType" is also in the query, but it is a number field looking up to the AddTypes table. Whereas the FTType field is a text field.

The information is the same for every recording being appended. It should be "Home" in the FTType field. The information is "8" (which is "List" in the AddTypes table). "List" is what is actually going to the FTType field.

I'm truly stumped on this. I've looked at the SQL view for the query and could find nothing amiss.

FYI, FTType is a translation of the AddType field which reduces the number of Types to 3 types. But it was entered by hand, so that shouldn't matter.

Any ideas?

Linda
dannyseager
please post the sql
likajoho
INSERT INTO Addresses ( ID, AddType, FTType, IndDef, Add1, Add2, City, ST, Zip, County, AddNote, CongDist, Precinct, SD, HD, TempAddSrcID, ImpCode )
SELECT DISTINCTROW ImportedList.ID, ImportedList.AddType, Addresses.FTType, Addresses.IndDef, ImportedList.Add1, ImportedList.Add2, ImportedList.City, ImportedList.ST, ImportedList.Zip, ImportedList.County, ImportedList.AddNote, ImportedList.CongDist, ImportedList.Precinct, ImportedList.SD, ImportedList.HD, ImportedList.SrcID, ImportedList.ImpCode
FROM Addresses RIGHT JOIN ImportedList ON Addresses.ID = ImportedList.ID
WHERE (((ImportedList.Add1) Is Not Null)) OR (((ImportedList.City) Is Not Null)) OR (((ImportedList.ST) Is Not Null)) OR (((ImportedList.Zip) Is Not Null)) OR (((ImportedList.County) Is Not Null)) OR (((ImportedList.CongDist) Is Not Null)) OR (((ImportedList.Precinct) Is Not Null)) OR (((ImportedList.SD) Is Not Null)) OR (((ImportedList.HD) Is Not Null))
ORDER BY ImportedList.ID;

Thanks, Danny
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.