Click here to Skip to main content
15,880,796 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to count the occurrence of word from a field of table 1 than compare it with a field of table 2 that how much time it occurred and than store it in table 1. I want this in MS ACCESS.I have a Table (Gap Summary) in that I have a Field (Data Domain) and I have another Table (TOC Data Elements) in that I have a Field (Domain). Field (Data Domain) is unique but Field (Domain) is not.. Field (Domain) has multiple similar values. I want to get value from Field (Data Domain) e.g Advance Directives and check it in Field (Domain) that how many time Advance Directives occurred there. Suppose it occurred 4 time than I want this value in Table (Gap Summary) Field (Total # of Data Elements)

What I have tried:

Like "*[table name].[column name]*"
Like "*[Gap Summary].[Data Domain]*"
Posted
Updated 15-Aug-16 8:03am
v2

1 solution

Like operates with a string: and that's what you are giving it. So it's looking for anything, followed by the text "[table name].[column name]", followed by anything else. That's not the content of the column, it's the text "[table name].[column name]".
To look for the content of a column, try:
SQL
LIKE "*" + [table name].[column name] + "*"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900