[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Syntax for Count(*)



You are right Tony. I fired that off hastily and wasn't as clear as I should
have been.
Daniel Kibler
Cambridge Technology Partners
925 543-4612
503 471-5111 Client site


                -----Original Message-----
                From:   Tony DeLia [mailto:tdelia@EROLS.COM]
                Sent:   Friday, April 02, 1999 4:33 AM
                To:     Multiple recipients of list SQR-USERS
                Subject:        Re: Syntax for Count(*)

                Clarification:

                You can't have non-SQL lines (eg, let ...) start in the 1st
'position'
                WITHIN the begin-select and end-select... The first position
is for
                select columns... and subsequent SQL (eg, from, where, ...)

                ...
                !   Below is outside of select (Position 1) - OKAY
                let #ERNctr = 0

                begin-select

                b.erncd
                count(*)     &b.count

                  !   Below is indented (Not in Position 1) - OKAY
                  let #ERNctr                = #ERNctr + 1
                  let ERNmtx.ERNttl(#ERNctr) = &b.erncd
                  if  #ERNctr >= 10
                      exit-select
                  end-if

                 from s_dhm_emp_detail   b
                where ...
                group by b.erncd
                order by 2 desc, 1

                end-select

                ...

                                             Tony DeLia

                Kibler, Daniel R - CFC wrote:
                >
                > Is the layout correct? You can't have non-SQL lines (eg,
let ...) start in
                > the 1st column.
                >
                > You also need to group on erncd.
                > Daniel Kibler

                --
                Tony DeLia
                AnswerThink Consulting Group
                PeopleSoft Solutions Practice - Delphi Partners
                tdelia@erols.com