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 field
(F1,F2,....F10, R6, R7, R8, R9, R10). I have few lacs combinations o
10 numbers in the Check table in the first 10 fields F1-F10).
I want to check how many numbers from the first combination (record
of Check table, fields F1-F10) matched in jan1 (record1 of Lott
table). If six numbers matches, update R6 field of record 1 of Chec
table to "1", if 10 numbers match, update R10 to "1". Don't updat
anything if 5 or less numbers match. Then check the same firs
combination of Check table in Jan2 (record 2 of Lotto table) an
increment R6-R10 fields by one. Continue this till date and then mov
on to the next combination (record2 of Check table).
John Nurick [Microsoft Access MVP] from Microsoft newsgroups ha
suggested me to normalise my data into three or more tables and as
for an answer in the microsoft.public.access.queries) newsgroup. Bu
I am really confused on how to do it as I don't know anything abou
normalisation. I am not able to understand the structure that h
wants me to have. Can any one explain to me what changes do I have t
make to my current database, how to use relationships and what querie
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.
Max
P1, P2,.....P21) and it has draw results from 1st Sep 2004 till date
I have another table (Table name : Check) with 15 field
(F1,F2,....F10, R6, R7, R8, R9, R10). I have few lacs combinations o
10 numbers in the Check table in the first 10 fields F1-F10).
I want to check how many numbers from the first combination (record
of Check table, fields F1-F10) matched in jan1 (record1 of Lott
table). If six numbers matches, update R6 field of record 1 of Chec
table to "1", if 10 numbers match, update R10 to "1". Don't updat
anything if 5 or less numbers match. Then check the same firs
combination of Check table in Jan2 (record 2 of Lotto table) an
increment R6-R10 fields by one. Continue this till date and then mov
on to the next combination (record2 of Check table).
John Nurick [Microsoft Access MVP] from Microsoft newsgroups ha
suggested me to normalise my data into three or more tables and as
for an answer in the microsoft.public.access.queries) newsgroup. Bu
I am really confused on how to do it as I don't know anything abou
normalisation. I am not able to understand the structure that h
wants me to have. Can any one explain to me what changes do I have t
make to my current database, how to use relationships and what querie
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.
Max