ilikered100
New Member
- Joined
- May 29, 2013
- Messages
- 46
I thought I posted this earlier this afternoon, but I can't find it anywhere so I'm reposting.
I have a table called MasterList where most of the fields are TRUE/FALSE (yes/no check boxes). I have two other tables with the same fields and field names (Yes I know now that this is very poor database design, but I'm stuck with it for now) that feed data into the MasterList table.
What I'm trying to do is aggregate all the TRUE's from different sources all into the MasterList table. When I run the query that merges data from one of the Merge tables into the MasterList table, it is overwriting the data in the MasterList table. What I want is if there is a TRUE in the MasterList table, but a FALSE(blank) in one of the merge tables, I want the TRUE to remain TRUE in the MasterList table. If there is a FALSE (blank) in the MasterList table and a TRUE in one of the Merge tables, then I want the MasterList table to be be updated to TRUE. So basically, I only want TRUE's to be updated, not FALSE's (blanks).
Here is a sample of the SQL I'm using when I merge data from one of the merge tables into the MasterList table
Any help is much appreciated and again I realize there is a big problem with the design of the database. I'm a very intermediate Access user with a little SQL knowledge.
I hope this made sense.
Thank you,
CJ
I have a table called MasterList where most of the fields are TRUE/FALSE (yes/no check boxes). I have two other tables with the same fields and field names (Yes I know now that this is very poor database design, but I'm stuck with it for now) that feed data into the MasterList table.
What I'm trying to do is aggregate all the TRUE's from different sources all into the MasterList table. When I run the query that merges data from one of the Merge tables into the MasterList table, it is overwriting the data in the MasterList table. What I want is if there is a TRUE in the MasterList table, but a FALSE(blank) in one of the merge tables, I want the TRUE to remain TRUE in the MasterList table. If there is a FALSE (blank) in the MasterList table and a TRUE in one of the Merge tables, then I want the MasterList table to be be updated to TRUE. So basically, I only want TRUE's to be updated, not FALSE's (blanks).
Here is a sample of the SQL I'm using when I merge data from one of the merge tables into the MasterList table
UPDATE MasterList INNER JOIN tblMathMerge ON MasterList.ID = tblMathMerge.ID
SET MasterList.MathReadAloud = [tblmathmerge].[MathReadAloud],
MasterList.MathFSFrequentBreaks = [tblmathmerge].[MathFSFrequentBreaks],
MasterList.MathCalculator = [tblmathmerge].[MathCalculator],
MasterList.MathPlainEnglish = [tblmathmerge].[MathPlainEnglish];
SET MasterList.MathReadAloud = [tblmathmerge].[MathReadAloud],
MasterList.MathFSFrequentBreaks = [tblmathmerge].[MathFSFrequentBreaks],
MasterList.MathCalculator = [tblmathmerge].[MathCalculator],
MasterList.MathPlainEnglish = [tblmathmerge].[MathPlainEnglish];
Any help is much appreciated and again I realize there is a big problem with the design of the database. I'm a very intermediate Access user with a little SQL knowledge.
I hope this made sense.
Thank you,
CJ