Access Query where i can sum occurrence of particular word

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rahul2310
    New Member
    • Oct 2013
    • 62

    Access Query where i can sum occurrence of particular word

    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
    Code:
     employee code    Item 1          Item 2        Sum
           1           Authorized      Not           1
           2           Authorized      Authorized    2
           3           Not             Not           0
    This Way Plz Help
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    You're looking at something along the lines of:

    Code:
    SELECT [pk]
       ,[nId]
       ,[lang1]
       ,[lang2]
       ,IIF(NZ([lang1],0)="a",1,0) 
          + IIF(NZ([lang2],0)="a",1,0) 
          AS sumofa
    FROM [tbl_expiment];
    )
    Ideally you would normalize this db: > Database Normalization and Table Structures.
    Last edited by zmbd; Dec 10 '13, 01:34 PM.

    Comment

    Working...