Results 1 to 2 of 2

Thread: db2 query help

  1. #1
    Join Date
    Aug 2003
    Posts
    5

    Unanswered: db2 query help

    Hi,
    we r facing problem in DB2 7.2.3 database on win2000 server.

    I need something like:
    SELECT
    Count(Field1) as f1 , count(field2) as f2, (f1+f2) as f3 from table where..................

    In MS access it can be done as (f1+f2) as f3 , but how to do it in DB2 to dynamically sum the result of query?

    urgent help needed

    thanks evryone,
    subhash
    Last edited by subhash13; 08-18-03 at 08:11.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Why not do it this way:


    SELECT
    Count(Field1) as f1 , count(field2) as f2, (Count(Field1) +count(field2) ) as f3 from table where....


    Andy

Posting Permissions

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