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

Re: Sql Count



Jason,

You are presently using the begin-Select - end-Select syntax structure
within a begin-SQL - end-SQL construct.

Use a procedure with a begin-Select - end-Select structure and the &variable
will be correctly populated.

The begin-SQL - end-SQL is only for 'pure SQL' syntax constructs.

Additionally, don't forget to qualify effective-dated records so the only
'current' rows get counted if that is your wish.

You will find numerous examples of effdt/effseq in the selects contained in
PeopleSoft delivered SQR's.

Regards,

David

----- Original Message -----
From: "Jason Rupp" <jrupp@TECHNEGLAS.COM>
To: <SQR-USERS@list.iex.net>
Sent: Thursday, January 03, 2002 3:38 PM
Subject: Sql Count


> Hello All:
>
> I am trying to do a count - Select count(*) - in sqr and move the value
> to a variable to be used later.  This is how I did it:
>
> Begin-sql
> count(*) &Count
> FROM PS_JOB
> End-Sql
>
> What am I doing wrong?
>
> Thanks for the help!!
>