Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: poorly written query?

Re: poorly written query?

From: Ian Ledzion <ian.ledzion_at_xlgbow.com>
Date: Fri, 23 Mar 2001 13:38:12 +0100
Message-ID: <99fg3r$8ab$1@rex.ip-plus.net>

Not to mention the schema name of the first table is different from that of the second:

...from ollectr.del_acct, collectr.acct_contact where...

"andrew_webby at hotmail" <spam_at_no.thanks.com> wrote in message news:985350390.671.0.nnrp-10.c30bdde2_at_news.demon.co.uk...
> You appear to be missing the join condition (the common field) between
 your
> two tables, hence it's adding up everything in sight.
>
> "Sk8er" <Sk8er.not_at_here.net> wrote in message
> news:uZBu6.3841$5%5.826023_at_news.uswest.net...
> > I am trying to run this particular query.................
> >
> > select collector_id assessor, count(collector_id) num_assmnts,
> > count(hotlined_yn) num_hotlines, count(pass_move_yn) num_pins,
> > count(suspend_yn) num_suspnds, sum(payment_recvd) pay_recvd,
> > count(payment_recvd) num_pays, sum(arts_amt) arts, count(arts_amt)
> > arts_total from ollectr.del_acct, collectr.acct_contact where
> > rep_review_date< sysdate and rep_review_date>= sysdate- 2 group by
> > collector_id;
> >
> > ..............via sql*plus on an Oracle 8.0.5 database from
> > a read only table. The sums add up more than just yesterday's date and
 it
> > takes forever to process. Could someone please give me some advice as to
> > what I might be doing wrong? Any help would be much appreciated!
> >
> >
>
>
Received on Fri Mar 23 2001 - 06:38:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US