[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
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