Gmail Agenda Documenten Reader Het internet meer »
Onlangs bekeken groepen | Help | Aanmelden
Google Discussiegroepen Startpagina
Oracle NULL vs '' revisited
Er zijn momenteel te veel onderwerpen in deze discussiegroep die als eerste worden weergegeven. Als je dit onderwerp als eerste wilt weergeven, moet je deze optie verwijderen van een ander onderwerp.
Er is een fout opgetreden bij het verwerken van je verzoek. Probeer het opnieuw.
Markeren
  Berichten 1 - 25 van 166 - Alles samenvouwen  -  Alles naar het vertalen Vertaald (alle originelen weergeven)   Nieuwer >
De groep waarnaar je een bericht verzendt, is een Usenet-groep. Berichten die je in deze groep verzendt, zijn zichtbaar voor iedereen op het Internet
Je antwoord is niet verzonden.
Uw bericht is geplaatst
 
Van:
Aan:
Cc:
Reactie op:
Cc toevoegen | Reactie toevoegen | Onderwerp bewerken
Onderwerp:
Validatie:
Typ ter verificatie de tekens uit de onderstaande afbeelding of de getallen die je hoort wanneer je klikt op het pictogram voor toegankelijkheid. Luister en typ de nummers die je hoort
 
Matthew Harrison  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 17 aug 2007, 16:49
Nieuwsgroepen: comp.databases.oracle.server
Van: Matthew Harrison <m.harris...@craznar.com>
Datum: Sat, 18 Aug 2007 00:49:49 +1000
Lokaal: vr 17 aug 2007 16:49
Onderwerp: Oracle NULL vs '' revisited
Ok, I'm developing another oracle application where the distinction
between NULL and '' will be important.

Given Oracle doesn't adhere to SQL standards for the distinction, is
there any best practices for comparing, and storing blank strings in a
table where the field is conceptually NOT NULL.

Thank you.

--
Pinging self [127.0.0.1] with 32 bites of banana cake:

Ping statistics for 127.0.0.1:
     Slices: Sent = 4, Received = 0, Lost = 4 (100% loss),


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
Mark D Powell  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 17 aug 2007, 18:39
Nieuwsgroepen: comp.databases.oracle.server
Van: Mark D Powell <Mark.Pow...@eds.com>
Datum: Fri, 17 Aug 2007 09:39:00 -0700
Onderwerp: Re: Oracle NULL vs '' revisited
On Aug 17, 10:49 am, Matthew Harrison <m.harris...@craznar.com> wrote:

> Ok, I'm developing another oracle application where the distinction
> between NULL and '' will be important.

> Given Oracle doesn't adhere to SQL standards for the distinction, is
> there any best practices for comparing, and storing blank strings in a
> table where the field is conceptually NOT NULL.

> Thank you.

> --
> Pinging self [127.0.0.1] with 32 bites of banana cake:

> Ping statistics for 127.0.0.1:
>      Slices: Sent = 4, Received = 0, Lost = 4 (100% loss),

I have always had difficulty with the concept that an empty string
should not be considered a NULL value to begin with.  What does an
empty string hold?   Oh wait, there is a binary zero used to indicate
that the last user data value preceeds the binary zero.  And if you
compare two binary zeroes you get an equality so two empty strings are
considered equal, but logically if the value is unknown there is no
way determine if A = b, A < B, or A > B.

The string construct was a way for the developers of C to deal with
the fact the processor they were using did not have instructions that
delt with character data very well.  Now we are apparently stuck with
it.

For the most part when dealing with character data that could be
unknown I have not found NULLs to be a problem even when the null had
to be transferred into a string variable in a program.  The database
behaves by one set of rules and the program by another.  If you need
to treat nulls in a specific column as equal (emtpy strings) then you
can use the NVL function in your where clause conditions, the is null
and is not null conditions, and/or an additional attribute column to
indicate empty where the column could also be NULL to handle the
situation.

IMHO -- Mark D Powell --


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
Thomas Kellerer  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 17 aug 2007, 18:51
Nieuwsgroepen: comp.databases.oracle.server
Van: Thomas Kellerer <FJIFALSDG...@spammotel.com>
Datum: Fri, 17 Aug 2007 18:51:57 +0200
Lokaal: vr 17 aug 2007 18:51
Onderwerp: Re: Oracle NULL vs '' revisited

Matthew Harrison wrote on 17.08.2007 16:49:

> Ok, I'm developing another oracle application where the distinction
> between NULL and '' will be important.

I would be interested: if this is important for character columns, then I assume
this is important for other columns as well.
How do you implement that distinction for e.g. NUMBER or DATE columns?

Thomas


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
DA Morgan  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
(1 gebruiker)  Meer opties 17 aug 2007, 18:56
Nieuwsgroepen: comp.databases.oracle.server
Van: DA Morgan <damor...@psoug.org>
Datum: Fri, 17 Aug 2007 09:56:24 -0700
Lokaal: vr 17 aug 2007 18:56
Onderwerp: Re: Oracle NULL vs '' revisited

Matthew Harrison wrote:
> Ok, I'm developing another oracle application where the distinction
> between NULL and '' will be important.

> Given Oracle doesn't adhere to SQL standards for the distinction, is
> there any best practices for comparing, and storing blank strings in a
> table where the field is conceptually NOT NULL.

> Thank you.

SQL> create table t (
   2  col1 varchar2(10),
   3  col2 varchar2(10));

Table created.

SQL> INSERT INTO t VALUES (NULL, '');

1 row created.

SQL> commit;

Commit complete.

SQL> SELECT sys_op_map_nonnull(col1), sys_op_map_nonnull(col2)
   2  FROM t;

SYS_OP_MAP_NONNULL(COL SYS_OP_MAP_NONNULL(COL
---------------------- ----------------------
FF                     FF

SQL>

Not unless you create a kludge. For example insert 'ZZYZX' where ever
you intend an empty string.

The better choice would be, no matter the database product, to never
have NULLs or empty strings. This can be done with proper design.
--
Daniel A. Morgan
University of Washington
damor...@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
Serge Rielau  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 17 aug 2007, 19:38
Nieuwsgroepen: comp.databases.oracle.server
Van: Serge Rielau <srie...@ca.ibm.com>
Datum: Fri, 17 Aug 2007 13:38:47 -0400
Lokaal: vr 17 aug 2007 19:38
Onderwerp: Re: Oracle NULL vs '' revisited
Thomas Kellerer wrote:

> Matthew Harrison wrote on 17.08.2007 16:49:
>> Ok, I'm developing another oracle application where the distinction
>> between NULL and '' will be important.

> I would be interested: if this is important for character columns, then
> I assume this is important for other columns as well.
> How do you implement that distinction for e.g. NUMBER or DATE columns?

If I get an assignment and I hand in an empty sheet that would be well
empty. I typed zero characters.
If I don't hand it in it is missing. It is not decidable whether my work
is good or bad, long short.. there is the NULL.
For numbers I think one can reasonably argue that 0 is the equivalent of
empty.
I don't think that there is a similar "empty" concept for dates.

Question: If empty strings make no sense for VARCHAR, why have them for
CLOBs? AFAIK Oracle has helper functions to produce empty lobs.

Cheers
Serge

PS: The Romans had some severe issues "getting" the concept of 0.
Today we take it for granted. Perhaps '' is no different :-)

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
Thomas Kellerer  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 17 aug 2007, 19:47
Nieuwsgroepen: comp.databases.oracle.server
Van: Thomas Kellerer <FJIFALSDG...@spammotel.com>
Datum: Fri, 17 Aug 2007 19:47:55 +0200
Lokaal: vr 17 aug 2007 19:47
Onderwerp: Re: Oracle NULL vs '' revisited

Serge Rielau wrote on 17.08.2007 19:38:

>> I would be interested: if this is important for character columns,
>> then I assume this is important for other columns as well.
>> How do you implement that distinction for e.g. NUMBER or DATE columns?
> If I get an assignment and I hand in an empty sheet that would be well
> empty. I typed zero characters.
> If I don't hand it in it is missing. It is not decidable whether my work
> is good or bad, long short.. there is the NULL.

If I don't hand it in, I don't "create a row in the database" that is something
different compared to handing in an empty "row/assignment"

> For numbers I think one can reasonably argue that 0 is the equivalent of
> empty.

Hmm. I get an an assignment where I should calculate something. I hand in a
sheet where I put 0 (zero) as the solution. So that is the same as handing in an
assignment where I didn't enter anything.
Doesn't sound logical to me.

> I don't think that there is a similar "empty" concept for dates.

That's my point. Character seems to be the only data were everybody requires the
distinction between "nothing" and "empty" but nobody has ever requested this
distinction for dates or numbers.

> Question: If empty strings make no sense for VARCHAR, why have them for
> CLOBs? AFAIK Oracle has helper functions to produce empty lobs.

I think that is a mere technical reason as for the CLOB some "management
structures" (such as a locator) need to be created while this is not necessary
with character data.

Thomas


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
hpuxrac  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 17 aug 2007, 20:11
Nieuwsgroepen: comp.databases.oracle.server
Van: hpuxrac <johnbhur...@sbcglobal.net>
Datum: Fri, 17 Aug 2007 11:11:07 -0700
Lokaal: vr 17 aug 2007 20:11
Onderwerp: Re: Oracle NULL vs '' revisited
On Aug 17, 10:49 am, Matthew Harrison <m.harris...@craznar.com> wrote:

> Ok, I'm developing another oracle application where the distinction
> between NULL and '' will be important.

> Given Oracle doesn't adhere to SQL standards for the distinction, is
> there any best practices for comparing, and storing blank strings in a
> table where the field is conceptually NOT NULL.

Having problems with  "where the field is conceptually NOT NULL"?

Well it's either defined as NOT NULL in the database or it will allow
nulls.

Why don't you define it as NOT NULL and remove the "is conceptually"
out of the equation.

Providing a default value is also sometimes a good option.

Tom Kyte has a bunch to say on this area in his books and his site
http://asktom.oracle.com


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
Brian Peasland  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 17 aug 2007, 20:33
Nieuwsgroepen: comp.databases.oracle.server
Van: Brian Peasland <d...@nospam.peasland.net>
Datum: Fri, 17 Aug 2007 13:33:22 -0500
Lokaal: vr 17 aug 2007 20:33
Onderwerp: Re: Oracle NULL vs '' revisited

Thomas Kellerer wrote:

> Serge Rielau wrote on 17.08.2007 19:38:
>>> I would be interested: if this is important for character columns,
>>> then I assume this is important for other columns as well.
>>> How do you implement that distinction for e.g. NUMBER or DATE columns?

>> If I get an assignment and I hand in an empty sheet that would be well
>> empty. I typed zero characters.
>> If I don't hand it in it is missing. It is not decidable whether my
>> work is good or bad, long short.. there is the NULL.
> If I don't hand it in, I don't "create a row in the database" that is
> something different compared to handing in an empty "row/assignment"

Depends on your data model doesn't it? What if the table looks like this:

STUDENT     EXAM1   EXAM2
Bob           75       82
Tom           83
Kristi        94       92
Chick         56       47

So what does the entry for Tom in EXAM2 mean? There is a row in the
table after all!

>> For numbers I think one can reasonably argue that 0 is the equivalent
>> of empty.
> Hmm. I get an an assignment where I should calculate something. I hand
> in a sheet where I put 0 (zero) as the solution. So that is the same as
> handing in an assignment where I didn't enter anything.
> Doesn't sound logical to me.

I don't think that I'd ever equate 0 to empty for numbers. But maybe
that's the mathematician in me. When computing averages or min values, a
0 can have a profound affect on the result where as no value can mean
something else. Take for example the following set of numbers:

{0, 11, 22, 33, 44}

The average is 22 and the min is 0. Now take these numbers:

{NULL, 11, 22, 33, 44}

Now the average is 27.5 and the min is 11.

So for those reasons, I would not reasonably argue that 0 is the
equivalent of empty. Of course...it does depend on how you are going to
use this data. There are cases where it does not make any difference.

>> I don't think that there is a similar "empty" concept for dates.
> That's my point. Character seems to be the only data were everybody
> requires the distinction between "nothing" and "empty" but nobody has
> ever requested this distinction for dates or numbers.

>> Question: If empty strings make no sense for VARCHAR, why have them
>> for CLOBs? AFAIK Oracle has helper functions to produce empty lobs.
> I think that is a mere technical reason as for the CLOB some "management
> structures" (such as a locator) need to be created while this is not
> necessary with character data.

Agreed.

Cheers!
Brian

--
===================================================================

Brian Peasland
d...@nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.

"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown

--
Posted via a free Usenet account from http://www.teranews.com


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
David Portas  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 17 aug 2007, 20:44
Nieuwsgroepen: comp.databases.oracle.server
Van: "David Portas" <REMOVE_BEFORE_REPLYING_dpor...@acm.org>
Datum: Fri, 17 Aug 2007 19:44:48 +0100
Lokaal: vr 17 aug 2007 20:44
Onderwerp: Re: Oracle NULL vs '' revisited
"Thomas Kellerer" <FJIFALSDG...@spammotel.com> wrote in message

news:5im5abF3p468kU1@mid.individual.net...

>> I don't think that there is a similar "empty" concept for dates.
> That's my point. Character seems to be the only data were everybody
> requires the distinction between "nothing" and "empty" but nobody has ever
> requested this distinction for dates or numbers.

The question of whether we choose to refer to some value as "empty" is
entirely beside the point in my opinion. The issue is that the domain of
string values supported by Oracle is not equivalent to the domain of string
values supported by any other DBMS or programming language that I know of.
Null is not a value. A string consisting of zero characters IS a value
anywhere except Oracle.

You could "design out" the problem as Daniel Morgan suggests but then you
may have to accept that some process or function which potentially has to
support zero-length string values can no longer use Oracle as a data store.
Alternatively, you have to compromise by using nulls to represent values or
converting the strings to some other data type or representation.

--
David Portas


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
Mark D Powell  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 17 aug 2007, 20:49
Nieuwsgroepen: comp.databases.oracle.server
Van: Mark D Powell <Mark.Pow...@eds.com>
Datum: Fri, 17 Aug 2007 11:49:51 -0700
Lokaal: vr 17 aug 2007 20:49
Onderwerp: Re: Oracle NULL vs '' revisited
On Aug 17, 12:56 pm, DA Morgan <damor...@psoug.org> wrote:

Proper design should reflect how the application being modeled works
in the real world.  In the real world information is often missing or
unknown so a proper design will have nullable columns.

In Cost-Based Oracle Fundamentals Jonathin Lewis shows some examples
of how using default values in place of nulls can mess up the CBO in
its determination of cardinality, which is what other optimizer
decisions are based on.

IMHO -- Mark D Powell --


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
zigzag...@yahoo.com  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 17 aug 2007, 23:14
Nieuwsgroepen: comp.databases.oracle.server
Van: zigzag...@yahoo.com
Datum: Fri, 17 Aug 2007 14:14:40 -0700
Lokaal: vr 17 aug 2007 23:14
Onderwerp: Re: Oracle NULL vs '' revisited
On Aug 17, 10:49 am, Matthew Harrison <m.harris...@craznar.com> wrote:

> Ok, I'm developing another oracle application where the distinction
> between NULL and '' will be important.

> Given Oracle doesn't adhere to SQL standards for the distinction, is
> there any best practices for comparing, and storing blank strings in a
> table where the field is conceptually NOT NULL.

> Thank you.

> --
> Pinging self [127.0.0.1] with 32 bites of banana cake:

> Ping statistics for 127.0.0.1:
>      Slices: Sent = 4, Received = 0, Lost = 4 (100% loss),

I do not believe, one has to set default values or some other value in
the field to treat as null. Any value you put in the field/variable is
not same thing as null. One has to store information whether a value
is null outside of field (such as in an indicator variable). Oracle
took care of this long time ago. When one writes code, e.g., in PRO*C,
Oracle has host variables and indicator variables. Host variable
stores the actual value of the field and indicator variables store the
fact whether the field is null or not. So when you want to save a null
in database, you set indicator variable, e.g., to -1. When you get a
value from Oracle it will set indicator variable to -1 if value was
null. Any time you do a check in your code to find whether a value is
null or not, you look at the indicator variable. Oracle provides
similar concepts in other labguages such Java. In PL/SQL, internally
Oracle perhaps uses same approach but Oracle has built short cuts in
PL/SQL language. For example to find whether i is null, one writes
code:
If (i is null). To insert null, insert table (col1) values (null);

Any other mechanism used such as empty value for Strings ,  0 or -
32767 for integer, or using default values are kludges which get you
in trouble sooner or later because null is not same as any of these
values. As long one follows Oracle's approach, there will not be any
problems. In my view, Oracle's approach is the right approach.


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
Serge Rielau  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 17 aug 2007, 23:17
Nieuwsgroepen: comp.databases.oracle.server
Van: Serge Rielau <srie...@ca.ibm.com>
Datum: Fri, 17 Aug 2007 17:17:17 -0400
Lokaal: vr 17 aug 2007 23:17
Onderwerp: Re: Oracle NULL vs '' revisited
Brian Peasland wrote:
> STUDENT     EXAM1   EXAM2
> Bob          75       82
> Tom           83
> Kristi        94       92
> Chick         56       47

> So what does the entry for Tom in EXAM2 mean? There is a row in the
> table after all!

Correct. So if Tom just got everything wrong he gets a 0.
If the TA hasn't reviewed the result yet that would be a NULL.
Or perhaps Tom was sick and is going to do the exam later.

Now let's use:
Firstname, Middlename, Lastname
George                 Bush

Which one do I mean?
If Middlename is an empty string then Sr.
If Middlename is NULL it could be either. It's not specified.

There are plenty of debates about the usage of NULL in general in data
bases.

You know me under 'Serge' NULL 'Rielau'. Homeland Security should not
confuse that with 'Serge' '' 'Rielau' because that ain't me.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
David Portas  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 17 aug 2007, 23:23
Nieuwsgroepen: comp.databases.oracle.server
Van: "David Portas" <REMOVE_BEFORE_REPLYING_dpor...@acm.org>
Datum: Fri, 17 Aug 2007 22:23:36 +0100
Lokaal: vr 17 aug 2007 23:23
Onderwerp: Re: Oracle NULL vs '' revisited
<zigzag...@yahoo.com> wrote in message

news:1187385280.227081.226550@g4g2000hsf.googlegroups.com...

> On Aug 17, 10:49 am, Matthew Harrison <m.harris...@craznar.com> wrote:

> Any value you put in the field/variable is
> not same thing as null.

Agreed. Any value is not the same thing as null

> In my view, Oracle's approach is the right approach.

Huh? But Oracle's approach is that the empty string value IS the same thing
as null!

--
David Portas


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
zigzag...@yahoo.com  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 17 aug 2007, 23:45
Nieuwsgroepen: comp.databases.oracle.server
Van: zigzag...@yahoo.com
Datum: Fri, 17 Aug 2007 14:45:26 -0700
Lokaal: vr 17 aug 2007 23:45
Onderwerp: Re: Oracle NULL vs '' revisited
On Aug 17, 5:23 pm, "David Portas"

I was not aware of that, but I do not belive same applied to other
data types such as integer,

    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
hpuxrac  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 18 aug 2007, 00:19
Nieuwsgroepen: comp.databases.oracle.server
Van: hpuxrac <johnbhur...@sbcglobal.net>
Datum: Fri, 17 Aug 2007 15:19:58 -0700
Lokaal: za 18 aug 2007 00:19
Onderwerp: Re: Oracle NULL vs '' revisited
On Aug 17, 5:17 pm, Serge Rielau <srie...@ca.ibm.com> wrote:

Y'all got some of that there homeland security stuff up in Toronto?

    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
Serge Rielau  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 18 aug 2007, 01:02
Nieuwsgroepen: comp.databases.oracle.server
Van: Serge Rielau <srie...@ca.ibm.com>
Datum: Fri, 17 Aug 2007 19:02:33 -0400
Lokaal: za 18 aug 2007 01:02
Onderwerp: Re: Oracle NULL vs '' revisited
hpuxrac wrote:
> Y'all got some of that there homeland security stuff up in Toronto?

US customs is at the Toronto Airport.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
hpuxrac  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 18 aug 2007, 01:45
Nieuwsgroepen: comp.databases.oracle.server
Van: hpuxrac <johnbhur...@sbcglobal.net>
Datum: Fri, 17 Aug 2007 16:45:19 -0700
Lokaal: za 18 aug 2007 01:45
Onderwerp: Re: Oracle NULL vs '' revisited
On Aug 17, 7:02 pm, Serge Rielau <srie...@ca.ibm.com> wrote:

> hpuxrac wrote:
> > Y'all got some of that there homeland security stuff up in Toronto?

> US customs is at the Toronto Airport.

> Cheers
> Serge

> --
> Serge Rielau
> DB2 Solutions Development
> IBM Toronto Lab

Unless the airport security staff is a whole lot smarter than the ones
we see around here I wouldn't advise any discussion about middle names
being NULL or NOT NULL.

    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
DA Morgan  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 18 aug 2007, 02:08
Nieuwsgroepen: comp.databases.oracle.server
Van: DA Morgan <damor...@psoug.org>
Datum: Fri, 17 Aug 2007 17:08:00 -0700
Onderwerp: Re: Oracle NULL vs '' revisited

Then you would be incorrect: It does.

Though I wouldn't suggest inserting an empty string into a DATE column.
--
Daniel A. Morgan
University of Washington
damor...@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
zigzag...@yahoo.com  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 18 aug 2007, 02:55
Nieuwsgroepen: comp.databases.oracle.server
Van: zigzag...@yahoo.com
Datum: Fri, 17 Aug 2007 17:55:08 -0700
Lokaal: za 18 aug 2007 02:55
Onderwerp: Re: Oracle NULL vs '' revisited
On Aug 17, 8:08 pm, DA Morgan <damor...@psoug.org> wrote:

Why did  then Oracle developed host variables, indicator variables
etc. Keeping null indicator separate from the actual value is the
right approach. When I have to insert null in a column, either I do
not use that column in insert or use indicator variable (in PRO*C) or
null in PL/SQL. It has always worked for me. Oracle may have messed up
things but if a disciplined approach by keeping null indicator
separate from the actual value is followed all through the code,
things will still work.

    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
Serge Rielau  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 18 aug 2007, 03:46
Nieuwsgroepen: comp.databases.oracle.server
Van: Serge Rielau <srie...@ca.ibm.com>
Datum: Fri, 17 Aug 2007 21:46:01 -0400
Lokaal: za 18 aug 2007 03:46
Onderwerp: Re: Oracle NULL vs '' revisited
hpuxrac wrote:
> On Aug 17, 7:02 pm, Serge Rielau <srie...@ca.ibm.com> wrote:
>> hpuxrac wrote:
>>> Y'all got some of that there homeland security stuff up in Toronto?
>> US customs is at the Toronto Airport.
> Unless the airport security staff is a whole lot smarter than the ones
> we see around here I wouldn't advise any discussion about middle names
> being NULL or NOT NULL.

Better not. That's why IBM sells MDM solutions ;-)

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
Matthew Harrison  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 18 aug 2007, 03:58
Nieuwsgroepen: comp.databases.oracle.server
Van: Matthew Harrison <m.harris...@craznar.com>
Datum: Sat, 18 Aug 2007 11:58:59 +1000
Lokaal: za 18 aug 2007 03:58
Onderwerp: Re: Oracle NULL vs '' revisited

Serge Rielau wrote:
> There are plenty of debates about the usage of NULL in general in data

In the case I'm working on the string is the command.

In their infinite wisdom, '' (the empty string) has a critical meaning
.. I need to ensure that this string is specified (i.e. NOT NULL), but
it can be specified as '' (meaning cancel).

--
Pinging self [127.0.0.1] with 32 bites of banana cake:

Ping statistics for 127.0.0.1:
     Slices: Sent = 4, Received = 0, Lost = 4 (100% loss),


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
Matthew Harrison  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 18 aug 2007, 04:01
Nieuwsgroepen: comp.databases.oracle.server
Van: Matthew Harrison <m.harris...@craznar.com>
Datum: Sat, 18 Aug 2007 12:01:42 +1000
Lokaal: za 18 aug 2007 04:01
Onderwerp: Re: Oracle NULL vs '' revisited

hpuxrac wrote:
> Why don't you define it as NOT NULL and remove the "is conceptually"
> out of the equation.

I need to define it as NOT NULL, however '' is a valid value (and has a
critical meaning) for the value.

SO - it is a NOT NULL value which has to store '' as a possible value.

--
Pinging self [127.0.0.1] with 32 bites of banana cake:

Ping statistics for 127.0.0.1:
     Slices: Sent = 4, Received = 0, Lost = 4 (100% loss),


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
Matthew Harrison  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 18 aug 2007, 04:06
Nieuwsgroepen: comp.databases.oracle.server
Van: Matthew Harrison <m.harris...@craznar.com>
Datum: Sat, 18 Aug 2007 12:06:00 +1000
Onderwerp: Re: Oracle NULL vs '' revisited

zigzag...@yahoo.com wrote:
>It has always worked for me. Oracle may have messed up
> things but if a disciplined approach by keeping null indicator
> separate from the actual value is followed all through the code,
> things will still work.

So , I have a stored proc with a parameter MSG.

I have a table with values MSG and MSGISNULL.

How do I tell the parameter is '' or NULL ?

Or does the client user have to pass two parameters and do the test in
their own langauge.

The catch here is that if it was a number, I just wouldn't put a value
in ... that is ... the stored procedure would not have been called.

So - how do I detect, and act on someone NOT calling the stored
procedure and set a flag ?

--
Pinging self [127.0.0.1] with 32 bites of banana cake:

Ping statistics for 127.0.0.1:
     Slices: Sent = 4, Received = 0, Lost = 4 (100% loss),


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
zigzag...@yahoo.com  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 18 aug 2007, 04:37
Nieuwsgroepen: comp.databases.oracle.server
Van: zigzag...@yahoo.com
Datum: Fri, 17 Aug 2007 19:37:32 -0700
Lokaal: za 18 aug 2007 04:37
Onderwerp: Re: Oracle NULL vs '' revisited
On Aug 17, 10:06 pm, Matthew Harrison <m.harris...@craznar.com> wrote:

Not sure I fully undesratnd , but I would think that client code has
to pass two paremetrs, one indicating whethere value is null or not ,
and the other the actaul value. You may even consiser an indicator
column in the table for this varchar2 column, so you can look at the
value of the indicator  column to decide whther " msg is not null.

    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
Gumby!  
Profiel weergeven   Naar het vertalen Vertaald (origineel weergeven)
 Meer opties 18 aug 2007, 11:14
Nieuwsgroepen: comp.databases.oracle.server
Van: "Gumby!" <localh...@gumby.com>
Datum: Sat, 18 Aug 2007 09:14:37 GMT
Lokaal: za 18 aug 2007 11:14
Onderwerp: Re: Oracle NULL vs '' revisited

zigzag...@yahoo.com wrote:
> Not sure I fully undesratnd , but I would think that client code has
> to pass two paremetrs, one indicating whethere value is null or not ,
> and the other the actaul value. You may even consiser an indicator
> column in the table for this varchar2 column, so you can look at the
> value of the indicator  column to decide whther " msg is not null.

The point is - if the client is calling the procedure, then the message
will not be null (but could be '').

That is - it's the uncalled messages are the problem ... I'd have to
create a flag for all of them saying with a bit mask of null flags.


    Doorsturen  
Je moet je aanmelden voordat je berichten kunt plaatsen.
Als je een bericht wilt verzenden, moet je eerst deelnemen aan deze discussiegroep.
Werk je bijnaam bij op de pagina met abonnementsinstellingen voordat je een bericht plaatst.
Je hebt geen toestemming om berichten te plaatsen.
Berichten 1 - 25 van 166   Nieuwer >
« Terug naar Discussies « Nieuwer onderwerp     Ouder onderwerp »

Discussiegroep maken - Google Discussiegroepen - Google Startpagina - Servicevoorwaarden - Privacybeleid
©2010 Google