Re: Hard to explain - multiple update fields query...
- From: John Spencer <spencer@xxxxxxxxxx>
- Date: Wed, 16 Jul 2008 20:04:23 -0400
Ok, then try restructuring the data into a table you create in your Access database. Data structure - field and tables names - are all generic guesses.
Fields:
ID
Award
AwardDate
NumberAwarded
AwardPrecedence
You will need 40 queries to populate the table from your current table.
INSERT INTO TempTable (ID, Award, AwardDate,NumberAwarded, Precedence)
SELECT ID, Award1
, Award1Date, NumberAwarded1
, AwardsPrecedenceTable.Precedence
FROM [AWARDsTable] Left JOIN AwardsPrecedenceTable
ON AwardsTable.Award = AwardsPrecedenceTable.Award
WHERE Award1 is Not Null
Now you have the data normalized and can shove it back into your original table. Perhaps cleaning out the 40 sets of fields first using an update query to set all the fields in the set to null and then using an update query to populate the sets.
You could do one set at a time if you wish. Clear out set 1 and populate it, clear out set 2 and populate it.
STEP 1: BACKUP your data before attempting the following.
STEP 2: BACKUP your data before attempting the following.
Without a backup you cannot restore the data if this does not work the way you expect.
.
- Follow-Ups:
- Re: Hard to explain - multiple update fields query...
- From: John Spencer
- Re: Hard to explain - multiple update fields query...
- From: pietlinden@xxxxxxxxxxx
- Re: Hard to explain - multiple update fields query...
- References:
- Re: Hard to explain - multiple update fields query...
- From: John Spencer
- Re: Hard to explain - multiple update fields query...
- From: David Mulholland
- Re: Hard to explain - multiple update fields query...
- Prev by Date: Re: Need help on a Query Calculation
- Next by Date: Re: Hard to explain - multiple update fields query...
- Previous by thread: Re: Hard to explain - multiple update fields query...
- Next by thread: Re: Hard to explain - multiple update fields query...
- Index(es):
Relevant Pages
|