Re: Prob with COUNT in a VIEW
Posted in 1997
David Williams <djw@smooth1.demon.co.uk> wrote: :>According to the manual "Informix Guide to SQL: Syntax for Windows NT" :>for OnLine 7.22 page 1-592 there are the following possible syntaxs :>for count: :> : I've checked in INFORMIXDIR Guide to SQL Syntax Version 6.0 Page 1-462... : : The syntax diagram is : : -->-+--COUNT(*)----------------------------------------------------+-------- : | | : | | : | | : | | : | | : +-COUNT---+--(-+- DISTINCT----+----+---------------+==Column-)-+ : | | | | | Name : | | | +---Table-------+ : | +---UNIQUE-----+ | Name | : | | | p. 1-506 | : | | | | : | | +---Synonym=====+ : | | | Name | : | | | p. 1-504 | : | | | | : +-----+ | +---View--------+ : | + | | Name : +-----+ | p. 1-510 : | | +-COUNT---+--(-+--------------+ | | | | +---ALL--------+ The above branch is added in the manual I downloaded though, which makes all my examples leagal, but any further explanation is nowhere to be found. (The plus in a black square in the manual says it's an Informix extention of the ANSI standard.) Anybody in the know? : Using this we get : :>count(*) : Legal : :>count(distinct columnname) : Legal :>count(unique columnname) -- same as above : Legal : :>count(columnname) : : NOT LEGAL! See above, it is acording to the 7.22 manual. :>count(all columnname) :> : NOT LEGAL! See above, it is acording to the 7.22 manual. : : : There is no path through the lower route which does not pass through : either the distinct or unique keywords. There is this new path. May be it's a documentation error? I don't have 7.22 so I can't test it. Anybody who can? Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org