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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with joins

Re: Help with joins

From: Raj <raj.kothary_at_thus.net>
Date: Tue, 9 Sep 2003 18:41:21 +0100
Message-ID: <bjl37n$qv4$1$8300dec7@news.demon.co.uk>

"Turkbear" <john.greco_at_dot.state.mn.us> wrote in message news:3n2slv8mvr8b4bkrkr0ueum654olplc7bc_at_4ax.com...
> "Raj" <raj.kothary_at_thus.net> wrote:
>

[snip]
> Time ( no pun intended) for an Outer Join!

:O)

> Try:
>
> select distinct c1.USER_NAME as USER_NAME, c1.CALLED_STATION_ID, c1.TIME
as
> START_T, c2.TIME as STOP_T
> from ACCOUNTING c1, ACCOUNTING c2
> where c1.CLIENT_FUNCTION_TYPE like 'LNS'
> and c2.CLIENT_FUNCTION_TYPE like 'LNS' (+)
> and c1.USER_NAME=c2.USER_NAME (+)
> and c1.ACCT_STATUS_TYPE like 'Start'
> and c2.ACCT_STATUS_TYPE in ('Stop', NULL) (+)
> and (TO_DATE(c1.TIME,'yyyy/mm/dd HH24:mi:ss') <=
TO_DATE(c2.TIME,'yyyy/mm/dd
> HH2
> 4:mi:ss') (+)

I tried what you have suggested, however I get the following error:

SQL> /
and c2.CLIENT_FUNCTION_TYPE like 'LNS' (+)

                                       *
ERROR at line 4:
ORA-00933: SQL command not properly ended

Any ideas?

Thanks,
Raj Received on Tue Sep 09 2003 - 12:41:21 CDT

Original text of this message

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