[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Syntax for Count(*)
- Subject: Re: Syntax for Count(*)
- From: Sam Spritzer <SSpritzer@GW.CTG.COM>
- Date: Fri, 2 Apr 1999 07:49:30 -0500
In almost all cases, the first line is usually "begin-Procedure" so it seems
that this rule is redundant anyway.
Sam
<<< Tony DeLia <tdelia@EROLS.COM> 4/ 2 7:33a >>>
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