How to group a function Column 
Author Message
 How to group a function Column

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)
;
           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



Fri, 17 Jul 1998 03:00:00 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. SQL: How to group a function column?

2. How to select a column that is not in the group by or aggregate function

3. SQL: Column Function in Group by Select

4. not a single-group group function ?

5. How to write a single-group group function

6. single-group group functions

7. Include Group and Non group columns in same query

8. how to transform rows into columns group by column

9. How to write column function, table function

10. Rolling Up a Group (or, Grouping a Group)

11. How to group totals over columns in a query (group in columns, not in rows)?

12. ADP problem - can't use function in Group/Sorting - WHY (works in MDB)


 
Powered by phpBB® Forum Software