Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005
    Posts
    1

    Unanswered: Newbie questions

    Hi all

    I have a two questions. I have used SQL before, mainly for Oracle.

    There is a command break on <column> skip 1. Does anyone know the equivalent to this commnad, in db2?

    How do I compute on a column in db2? This is to get totals.


    All help is greatly appreciated.


    Jason

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    First of all, "BREAK ON <column>" is not a SQL statement; it's a SQL*Plus command and as such it has no equivalent in DB2 Command Line Processor.

    Use an aggregate function:

    SELECT DEPT, SUM(SALARY) FROM EMPLOYEE GROUP BY DEPT

Posting Permissions

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