M
mac_see
I have a table (Table name : Lotto) with 23 fields (D_No, DrawDate, P1,
P2,.....P21) and it has draw results from 1st Sep 2004 till date. I have
another table (Table name : Check) with 15 fields (F1,F2,....F10, R6, R7, R8,
R9, R10). I have few lacs combinations of 10 numbers in the Check table in
the first 10 fields F1-F10).
I want to check how many numbers from the first combination (record1 of
Check table, fields F1-F10) matched in jan1 (record1 of Lotto table). If six
numbers matches, update R6 field of record 1 of Check table to "1", if 10
numbers match, update R10 to "1". Don't update anything if 5 or less numbers
match. Then check the same first combination of Check table in Jan2 (record 2
of Lotto table) and increment R6-R10 fields by one. Continue this till date
and then move on to the next combination (record2 of Check table).
John Nurick [Microsoft Access MVP] has suggested me to normalise my data
into three or more tables and ask for an answer in the
(microsoft.public.access.queries) newsgroup. But I am really confused on how
to do it as I don't know anything about normalisation. I am not able to
understand the structure that he wants me to have. Can any one explain to me
what changes do I have to make to my current database, how to use
relationships and what queries should I use to get the desired result?
Following is his suggestion.
tblDraws (one record per draw)
D_No (primary key)
DrawDate
tblNumbersDrawn (21 records per draw)
D_No (foreign key)
DrawnNumber
(primary key includes both these fields)
tblCombinations (10 records per combination)
C_No (foreign key)
PickedNumber
(primary key includes both these fields)
Any help will be appreciated.
Maxi
P2,.....P21) and it has draw results from 1st Sep 2004 till date. I have
another table (Table name : Check) with 15 fields (F1,F2,....F10, R6, R7, R8,
R9, R10). I have few lacs combinations of 10 numbers in the Check table in
the first 10 fields F1-F10).
I want to check how many numbers from the first combination (record1 of
Check table, fields F1-F10) matched in jan1 (record1 of Lotto table). If six
numbers matches, update R6 field of record 1 of Check table to "1", if 10
numbers match, update R10 to "1". Don't update anything if 5 or less numbers
match. Then check the same first combination of Check table in Jan2 (record 2
of Lotto table) and increment R6-R10 fields by one. Continue this till date
and then move on to the next combination (record2 of Check table).
John Nurick [Microsoft Access MVP] has suggested me to normalise my data
into three or more tables and ask for an answer in the
(microsoft.public.access.queries) newsgroup. But I am really confused on how
to do it as I don't know anything about normalisation. I am not able to
understand the structure that he wants me to have. Can any one explain to me
what changes do I have to make to my current database, how to use
relationships and what queries should I use to get the desired result?
Following is his suggestion.
tblDraws (one record per draw)
D_No (primary key)
DrawDate
tblNumbersDrawn (21 records per draw)
D_No (foreign key)
DrawnNumber
(primary key includes both these fields)
tblCombinations (10 records per combination)
C_No (foreign key)
PickedNumber
(primary key includes both these fields)
Any help will be appreciated.
Maxi