Am Mittwoch, 13. November 2002 07:22 schrieb Ross J. Reedstrom:
> Hey Hackers -
...
>
> CREATE VIEW current_modules AS
>        SELECT * FROM modules m
>               WHERE module_ident =
>                     (SELECT max(module_ident) FROM modules
>                             WHERE m.moduleid = moduleid GROUP BY moduleid);
>
...

I just wonder if you really need the GROUP BY. The subselect should return 
exactly one row and so max does without GROUP BY:
  CREATE VIEW current_modules AS
         SELECT * FROM modules m
                WHERE module_ident =
                      (SELECT max(module_ident) FROM modules
                              WHERE m.moduleid = moduleid);


Tommi

-- 
Dr. Eckhardt + Partner GmbH
http://www.epgmbh.de

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to