User Profile

Collapse

Profile Sidebar

Collapse
anishap
anishap
Last Activity: Oct 10 '08, 05:49 PM
Joined: Oct 1 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • anishap
    started a topic Counting rows

    Counting rows

    Hello,

    I have a table with the below data:

    ID Cat Rat Rabbits

    001 A B D
    002 A C E
    003 B A A
    004 A E B
    005 D A B
    006 B C A

    I want to count the # of A,B,C,D and E's from each column.
    Code:
    SELECT cat,sum(Abs(cat="A" or "B" or "C" or "D")) as Cat_Tot
    from sample
    group by cat
    ...
    See more | Go to post
    Last edited by NeoPa; Oct 12 '08, 10:10 PM. Reason: Please remember to use the [CODE] tags provided

  • anishap
    started a topic Case Statements

    Case Statements

    Can anyone help me with the case statements?
    I have customized a new report for our application (vendor software). I want the end user to check 3 boxes to print (they can choose all or one or two).

    Below is the case statement I tired in the where clause

    Where
    STATUS = CASE
    WHEN REPORT.SEPARATE D = 'y' THEN 'S'
    WHEN REPORT.TERMINAT ED = 'y' THEN 'T'
    WHEN REPORT.RETIRED ='y' THEN 'R'...
    See more | Go to post
No activity results to display
Show More
Working...