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
nigelcg
Messages: 4
Registered: April 2008
Junior Member
Hi,
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?

Thanks
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: 8635
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.
Re: Outer Joins and To_Char [message #557657 is a reply to message #310628] Thu, 14 June 2012 11:15 Go to previous messageGo to next message
shawnford
Messages: 3
Registered: June 2012
Junior Member
and a no dater

AND TO_CHAR(f.recid(+)) = g.uniqueid
Re: Outer Joins and To_Char [message #557658 is a reply to message #557657] Thu, 14 June 2012 11:21 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/

You never get a second chance to make a first impression.
Why did you decide for your first post here to resurrect a 4 year old zombie thread?
Re: Outer Joins and To_Char [message #557672 is a reply to message #557658] Thu, 14 June 2012 12:49 Go to previous messageGo to next message
shawnford
Messages: 3
Registered: June 2012
Junior Member
why is it a Zombie thread? Perhaps it is being read just not updated.
Re: Outer Joins and To_Char [message #557673 is a reply to message #557672] Thu, 14 June 2012 12:54 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>AND TO_CHAR(f.recid(+)) = g.uniqueid
out of what hat did you pull the fabricated column names & datatypes?
Re: Outer Joins and To_Char [message #557687 is a reply to message #557673] Thu, 14 June 2012 14:59 Go to previous messageGo to next message
shawnford
Messages: 3
Registered: June 2012
Junior Member
Oracle
Re: Outer Joins and To_Char [message #557689 is a reply to message #557687] Thu, 14 June 2012 15:04 Go to previous message
joy_division
Messages: 4641
Registered: February 2005
Location: East Coast USA
Senior Member
shawnford wrote on Thu, 14 June 2012 15:59
Oracle


Looks like another zombie post here too.
Previous Topic: order of expression evaluation
Next Topic: Hierarchical Cubes in SQL
Goto Forum:
  


Current Time: Wed Dec 07 12:51:14 CST 2016

Total time taken to generate the page: 0.10642 seconds