From: nsouto@nsw.bigpond.net.au.nospam (Nuno Souto)
Newsgroups: comp.databases.oracle.server
Subject: TO_DATE does not work inside PLSQL cursor???
Organization: D.C.S. P/L
Message-ID: <3a35ef20.4856709@news-server>
X-Newsreader: Forte Free Agent 1.21/32.243
Lines: 27
Date: Tue, 12 Dec 2000 09:36:43 GMT
NNTP-Posting-Host: 144.132.172.151
X-Complaints-To: news@bigpond.net.au
X-Trace: news-server.bigpond.net.au 976613803 144.132.172.151 (Tue, 12 Dec 2000 20:36:43 EST)
NNTP-Posting-Date: Tue, 12 Dec 2000 20:36:43 EST


Hi fellas.

Found out what the problem was.

The table has a column with the name (wait for it!)

TO_DATE  NOT NULL DATE

!!!!!!

Now, this is not a problem if you use the function TO_DATE in a normal
SQL statement.  
But if you use it inside a cursor in a PL/SQL block, all hell breaks
loose: PL/SQL will think the TO_DATE is your column, not the function.
And it plonks you a PLS-00222 for good measure.

This is a problem with PL/SQL.

Of course, no one in his/her right mind would create such a column in
an ORACLE table.  Except Sybaser's converting to ORACLE.
<sigh>.....


Cheers
Nuno Souto
nsouto@bigpond.net.au.nospam
http://www.users.bigpond.net.au/the_Den/index.html

