Home » SQL & PL/SQL » SQL & PL/SQL » Outer Joins and To_Char (Oracle 9)
Outer Joins and To_Char [message #310626] Tue, 01 April 2008 16:49 Go to next message
Messages: 4
Registered: April 2008
Junior Member
I need to use an outer join outside a to_char

to_char(the_date_field,'YYYYWW')(+) = '200815'

This throws up the error ORA-00936 missing expression.

I know it will work if I put the (+) right after the date before the mask but it need to check the week rather than the date.

I have tried using a function based index without success.

Any ideas?

Re: Outer Joins and To_Char [message #310628 is a reply to message #310626] Tue, 01 April 2008 17:19 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8904
Registered: November 2002
Location: California, USA
Senior Member
to_char (the_date_field(+), 'YYYYWW') = '200814'

is the correct method. If you test it, you will see that it returns the correct results.
icon14.gif  Re: Outer Joins and To_Char [message #658272 is a reply to message #310628] Wed, 07 December 2016 15:05 Go to previous message
Messages: 1
Registered: December 2016
Junior Member
This is the correct answer. Thank you for helping me fix my issue
Previous Topic: External tables (.csv)
Next Topic: Trigger on Materialized View Log tables
Goto Forum:

Current Time: Mon Nov 19 01:25:48 CST 2018