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

Re: Help with SQL



Bill,
I can see you are missing a comma after 'b.erncd'. I don't see any joint with
'ps_employment q' table with other tables at where clause (this may be a performance's problem). Hope will help. Happy New Year!


At 01:54 PM 1/5/98 PST, you wrote:
> I am running the following sql within an sqr and it runs, and runs and
> runs. Anybody (familiar with PeopleSoft) have any ideas?
>
>
> select
> c.deptid,
> q.union_cd,
> b.pay_end_dt,
> b.erncd
> sum(b.oth_hrs),
> sum(b.oth_pay)
> from ps_pay_oth_earns b, ps_employment q, ps_pay_earnings c
> where b.pay_end_dt between '01-JAN-97' and '31-DEC-97'
> and b.company = c.company
> and b.paygroup = c.paygroup
> and b.pay_end_dt = c.pay_end_dt
> and b.page# = c.page#
> and b.line# = c.line#
> and b.addl# = c.addl#
> group by c.deptid,
> q.union_cd,
> b.pay_end_dt,
> b.Erncd
>
> Thanks in advance
>
> Bill Bowers
> St. Peters Hospital
> Olympia, Washington
> (360) 393-5437
>
>

Benjamin Le
System Development, ITS
Portland Community College
PO Box 19000 Portland, OR. 97280-0990 U.S.A.
Phone: (503)-977-4970 Fax:(503)-977-4987
E-mail: Mailto:ble@pcc.edu
PCC Web: http://www.pcc.edu