[thelist] counting used columns in Access SQL

rudy rudy937 at rogers.com
Wed Oct 15 18:49:14 CDT 2003


> name  val1 val2 val3
>    a       1     2     3
>    b       1     2
> 
> Results:
> name  steps
>    a        3
>    b        2


hi bryan


    select name
         , iif(isnull(val1),0,1)
         + iif(isnull(val2),0,1)
         + iif(isnull(val3),0,1) as steps
      from yourtable
    

rudy


More information about the thelist mailing list