Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.glorb.com!news-out.octanews.net!indigo.octanews.net!authen.yellow.readfreenews.net.POSTED!not-for-mail
From: Geoff Muldoon <geoff.muldoon@trap.gmail.com>
Newsgroups: comp.databases.oracle.misc,comp.lang.php
Subject: Re: Oracle/PHP problem
Date: Wed, 1 Mar 2006 09:27:38 +1100
Message-ID: <MPG.1e6f79671f59c1a5989772@news.readfreenews.net>
References: <MPG.1e6e708b667faf9c98976e@news.readfreenews.net> <qsa902tusfcrq4uh9b0akd1su5pti6lqp1@4ax.com>
Organization: Southern Cross University
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.60.2060
Lines: 33
NNTP-Posting-Date: 28 Feb 2006 16:27:13 CST
X-Trace: DXC=3VBEP5GlkIH>YE@i>]dblEbQ9W<K20`3BO6Gh9bA988N74Ra6a?;HA@TOJe332IoEOAcl[W9o3ODHc5gM8SVL0`J>iYfn<N:KeA
Xref: dp-news.maxwell.syr.edu comp.databases.oracle.misc:125568

andy@andyh.co.uk says...

>  My initial thought is NLS issues - implicit conversions somewhere in the view?

Bingo.

Although in my PHP code I always use explicit (to_date) date conversion in 
any SQL, it appears that querying a view that has been successfully 
compiled using implicit date conversion causes the problem.  

Odd that PHP and/or AdoDB and/or OCI appears to be attempting to 
"revalidate" the view when simply selecting from it.  Don't know if this 
is version specific or even at what stage (PHP/AdoDb/OCI/Oracle Client) 
it's kicking in.  

Just recompiled the view with explicit date conversion and moving on, no 
time to chase further.

Thanks Andy and Erwin for your pointers, owe you one.

Geoff

>  ORA-01858 is thrown by date conversions - don't think anything else throws
> that, IIRC.
>  
>  What's NLS_DATE_FORMAT set to? 
> 
>  What's the definition of the view?
> 
>  When you queried the table directly, did you use *exactly* the same SQL as the
> view definition?
> 
> 
