By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 2,646 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

Access Query where i can sum occurrence of particular word

P: 62
I want to add column in the query which will sum the occurrence of word "authorized"
Suppose query returns 1 row as result.
In that one row how many times word "authorized" has occurred
For Example
Expand|Select|Wrap|Line Numbers
  1.  employee code    Item 1          Item 2        Sum
  2.        1           Authorized      Not           1
  3.        2           Authorized      Authorized    2
  4.        3           Not             Not           0
This Way Plz Help
Dec 10 '13 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 5,287
You're looking at something along the lines of:

Expand|Select|Wrap|Line Numbers
  1. SELECT [pk]
  2.    ,[nId]
  3.    ,[lang1]
  4.    ,[lang2]
  5.    ,IIF(NZ([lang1],0)="a",1,0) 
  6.       + IIF(NZ([lang2],0)="a",1,0) 
  7.       AS sumofa
  8. FROM [tbl_expiment];
  9. )
Ideally you would normalize this db: > Database Normalization and Table Structures.
Dec 10 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.