Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sybrand Bakker: Any suggestions?
"Sk8er" <Sk8er.not_at_here.net> honoured comp.databases.oracle.server on Thu 29 Mar 2001 04:42:49a with <84yw6.1864$za3.617962_at_news.uswest.net>:
>Martin,
>Thanks for the suggestion ..........unfortunately that was something I'd all
>ready tried earlier in the game. Nevertheless, any other suggestions are
>certainly welcomed. I believe there must be a way, but I'm starting to feel
>a little hopeless.
>
>"Martin Haltmayer" <Martin.Haltmayer_at_0800-einwahl.de> wrote in message
>news:3AC2163D.59BBDA69_at_0800-einwahl.de...
>> Did you try
>>
>> select distinct ...
>>
>> instead of
>>
>> select ...
>>
>> ?
>>
>> Martin
>>
>>
>>
>> Sk8er wrote:
>> >
>> > My immediate stumper lies within the problem that there are 2 tables but
>> > only 1 PAYMENT_RECVD column (datatype NUMBER(9,2)) whereas there are 2
>> > different collectors ( 2 seperate columns with datatype CHAR) AND 2
>> > different dates (2 seperate columns with datatype DATE). Trying to
figure
>> > out the amount of payment received by each INDIVIDUAL collector seems to
be
>> > impossible to abstract. This is what I've unsuccessfully tried:
>> >
>> > SELECT b.collector2, b.coll2_date,
>> > a.payment_recvd
>> > FROM collectr.acct a, collectr.contact b
>> > WHERE b.coll2_date
>> > BETWEEN to_date('20-MAR-2001')
>> > AND to_date('28-MAR-2001')
>> > AND b.call_num=a.call_num
>> > AND b.collector2<>a.collector1
>> > AND b.coll2_date<>a.coll1_date
>> > ORDER by 1;
>> >
>> > Also.............sometimes, but not always, COLLECTOR1 can be the same
>> > person(sometimes in the same case size and sometimes in different case
size)
>> > as COLLECTOR2 and.......... COLL1_DATE can sometimes, but not always, be
the
>> > same as COLL2_DATE. I currently have only SELECT ON privileges to this
>> > schema so my BIG questions are: Is there a query that can abstract this
>> > information that I need? And if so, can I obtain the amounts of both
>> > collectors within the same query? Any help is greatly appreciated.
>>
>>
>
>
Would a UNION or some other sort of set operator work? I haven't played with
that myself but I may need to in near future.
Received on Thu Mar 29 2001 - 04:55:56 CST
![]() |
![]() |