niki
axes noob 'll b big 1 day
- Local time
- Today, 02:46
- Joined
- Apr 17, 2003
- Messages
- 66
Hello,
I have two databases which have multiple entries containg each multiple fields, and each of these fields contains a single keyword.
Table 1 (m rows, n keywords for each row)
ID keyword[1] keyword[2] keyword keyword[n]
-----------------------------------------------------------
1 cat dog horse sheep
j ........ .......... ............ ..........
m volvo bmw ferrari renault
Table 2 (p rows, n keywords for each row)
ID keyword[1] keyword[2] keyword keyword[n]
-----------------------------------------------------------
1 spider snake dog fish
j ........ .......... ............ ..........
p audi ferrari ford chrysler
I want access (or maybe excel would be easier), to take each word from one table and to search through the other table for matching. You 'll have understood it, in this example I'd like a third database created with the matches dog and ferrari, as following:
Table 3
ID Keyword match ID entry table 1 ID entry table 2
-----------------------------------------------------------
1 dog 1 1
k ........ .......... ............
p ferrari 2 2
What's the command line, or the function? I believe there will be four loops embeddedlike this: But I don't know the functions nor the declarations to write..
for i=1 to i=m (table1) *chooses the row*
{
for j=1 to j=n (table1) *chooses the keyword in the row*
{ read keyword [j]
for k=1 to k=p (table2) *chooses the row in which the keyword will be searched*
{
for l=1 to l=n (table2) *chooses the keyword in the row with which the keyword will be compared*
{search keyword [j]
}
End for
If keyword [k] [l]=keyword [j]
Return [k] [l] [j]
Else
}
End for
}
End for
}
End for
Another issue is that I have multiple keywords fields for one entry, I guess for calculation purposes I should have a single word for each entry, but I use a parsing query and its made to create a field for each key word... I can have up to 60 keywords for a single entry. How could I use a query on a single field which would create an entry for every keyword?? but hey thats another problem...
Thanks for your help.
I have two databases which have multiple entries containg each multiple fields, and each of these fields contains a single keyword.
Table 1 (m rows, n keywords for each row)
ID keyword[1] keyword[2] keyword keyword[n]
-----------------------------------------------------------
1 cat dog horse sheep
j ........ .......... ............ ..........
m volvo bmw ferrari renault
Table 2 (p rows, n keywords for each row)
ID keyword[1] keyword[2] keyword keyword[n]
-----------------------------------------------------------
1 spider snake dog fish
j ........ .......... ............ ..........
p audi ferrari ford chrysler
I want access (or maybe excel would be easier), to take each word from one table and to search through the other table for matching. You 'll have understood it, in this example I'd like a third database created with the matches dog and ferrari, as following:
Table 3
ID Keyword match ID entry table 1 ID entry table 2
-----------------------------------------------------------
1 dog 1 1
k ........ .......... ............
p ferrari 2 2
What's the command line, or the function? I believe there will be four loops embeddedlike this: But I don't know the functions nor the declarations to write..
for i=1 to i=m (table1) *chooses the row*
{
for j=1 to j=n (table1) *chooses the keyword in the row*
{ read keyword [j]
for k=1 to k=p (table2) *chooses the row in which the keyword will be searched*
{
for l=1 to l=n (table2) *chooses the keyword in the row with which the keyword will be compared*
{search keyword [j]
}
End for
If keyword [k] [l]=keyword [j]
Return [k] [l] [j]
Else
}
End for
}
End for
}
End for
Another issue is that I have multiple keywords fields for one entry, I guess for calculation purposes I should have a single word for each entry, but I use a parsing query and its made to create a field for each key word... I can have up to 60 keywords for a single entry. How could I use a query on a single field which would create an entry for every keyword?? but hey thats another problem...

Thanks for your help.
Last edited: