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

Home -> Community -> Usenet -> c.d.o.misc -> Re: null indicators....

Re: null indicators....

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Tue, 18 Sep 2007 07:40:44 -0700
Message-ID: <1190126444.107370.229100@r29g2000hsg.googlegroups.com>


On Sep 17, 2:21 pm, jerseyca..._at_gmail.com wrote:
> We have a code generation process which spits out a tremendous amount
> of data loading code. We selectively add indicators to these table
> fields based on certain criteria, such as data type, nullablility,
> etc.
>
> Question is, is their any harm in giving every field an indicator,
> regardless of type and/or attributes?
>
> We have a problem lately with mismatching database schemas and
> software releases, and doing this would help with that problem. It
> would also simplify the code generation tool too ;)
>
> Thanks,
> AJ

AJ, if you are talking about adding indicators to the Oracle tables for these attributes then it is a horrible idea. The "is null" and "is not null" where clause conditions and the coalesce, nullif, nvl, and nvl2 funcitons exist to handle NULLs in the database and on retieval.

If you are talking about adding these to the extracted data it depends on what the extracted data is going to be used for and where and in what form it is being sent.

The Pro*C manual recommend defining null indicatior bytes for variables that can be null and that these indicators should be checked after a fetch to determine if each corresponding program column variable has data before using it.

I think you will find my post in agreement with the main points made by Frank, Daniel, and Ed.

Always include the Oracle version and list your tool set.

HTH -- Mark D Powell -- Received on Tue Sep 18 2007 - 09:40:44 CDT

Original text of this message

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