Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2013
    Posts
    6

    Exclamation Unanswered: Grand totals in Oracle SQL

    How do i display grand totals in sql in oracle for this sql:

    Code:
    select
          CASE(interface_id)
                 WHEN 12 THEN '12-CASHISS'
              ELSE 'Unknown'
          END Interfaces
         ,display_event_sub_types.text_description||'-'||event_log.event_subtype EvtSubType
         ,count(1)  Totals
    
    from event_log
     where event_log.event_type_id = event_types.event_type_id
    ;
    Last edited by E320star; 04-12-13 at 12:51.

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Quote Originally Posted by E320star View Post
    How do i display grand totals in sql in oracle for this sql: . . .
    Add this before the query:
    Code:
    COMP SUM OF totals ON REPORT
    BREAK ON REPORT
    -- Your query here --
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Apr 2013
    Posts
    6
    Thank you. It is displaying it as:
    sum 156


    Is there a way to change the sum to Grand Total?

    Thank you

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    when all else fails, Read The Fine Manual

    COMPUTE
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Apr 2013
    Posts
    6
    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •