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

Home -> Community -> Usenet -> c.d.o.server -> Re: Howto do undo a default clause?

Re: Howto do undo a default clause?

From: Noons <wizofoz2k_at_yahoo.com.au.nospam>
Date: Sat, 2 Aug 2003 00:07:11 +1000
Message-ID: <3f2a748c$1$10358$afc38c87@news.optusnet.com.au>


"Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> wrote in message news:3f2a4c09$0$18493$ed9e5944_at_reading.news.pipex.net...

> *********** you don't get a string null you get a real null value. I'd

I didn't say I got anything different. The problem is the Java generator reads the 'NULL' string off the XML tag generated from the dictionary and insists on filling the column up with 'NULL' (the string) when sending it back to the db...

> suggest that if the value null is being converted to the string 'NULL' by
> the java generator then this is where it is going wrong. (assuming it is
> actually going wrong).

That is indeed the case. What I've got to do is "teach" the XML extraction PL/SQL to ignore a 'NULL' inside a default value in all_tab_columns and just chop-off the entire <DEFAULT_VALUE> tag from the output.

And hope like crazy no one ever defines a true string constant of 'NULL' as a default value for a varchar2 column anywhere in this application...

> NB this all is very similar to the asktom link dave posted. I think that
> what I learn from this is that in fact the default value of a column isn't
> ever really a default value in the sense of a constant, it is should be
> really thought of as the return value of a function - even if that function
> always returns the same result (like 0).

Then why the heck doesn't it let me use a PL/SQL function to return that value? :(

--
Cheers
Nuno Souto
wizofoz2k_at_yahoo.com.au.nospam
Received on Fri Aug 01 2003 - 09:07:11 CDT

Original text of this message

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