How to group a cunction column?

From: <sl6gs_at_cc.usu.edu>
Date: 1996/01/29
Message-ID: <1996Jan29.125358.72618_at_cc.usu.edu>#1/1


Hi Everyone:

     I wanted to group a function value
but it did not work. Code list as flwing:

create view SurgView1

       (Surgeon, age,open,close)
as
  Select S1.surg_name, agethen(e1.rep_date, d1.dob), sum(e1.open), sum(closeno(e1.open))

       from surgeons s1,pt_demo d1, pt_event1 e1, cathdate
       where d1.card_no = e1.card_no
       and s1.surg_no = e1.surg_no
       and e1.class ='S' 
       and cathdate.seqno =1
       and e1.rep_date <= cathdate.date2
       and e1.rep_date >= cathdate.date1
       group by s1.surg_name,  agethen(e1.rep_date, d1.dob)
;

    { end of code list}

      group by s1.sur_name, agethen(e1.rep_date, d1.dob) did not work

       Any suggestion from your experienced programmers will be greatly appreciated.

Wei Jiang Received on Mon Jan 29 1996 - 00:00:00 CET

Original text of this message