; To: Don Drake
> Cc: Richard Huxton; [EMAIL PROTECTED]
> Subject: Re: [SQL] NULLS and string concatenation
>
>
>
> On Fri, 19 Nov 2004, Don Drake wrote:
>
> > On Fri, 19 Nov 2004 17:48:34 +, Richard Huxton
> <[EMAIL PROTECTED]> wrote:
> > > Don Drake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Gregory S. Williamson wrote:
| Someone on this list provided me with a rather elegant solution to
this a few weeks ago:
|
| CREATE OR REPLACE FUNCTION
text_concat_nulls_with_an_embedded_space(text, text)
| RETURNS text
| AS 'SELECT CASE WHEN $1 IS NULL
On Fri, 19 Nov 2004 15:01:42 -0500, Tom Lane <[EMAIL PROTECTED]> wrote:
> Don Drake <[EMAIL PROTECTED]> writes:
> > This is still strange to me. In Oracle, the same query would not
> > replace the *entire* string with a NULL, it treats the NULL as a no
> > value.
>
> Oracle is a bit, um, standard
-Original Message-
> From: Michael Fuhr [mailto:[EMAIL PROTECTED]
> Sent: Fri 11/19/2004 9:53 AM
> To: Don Drake; [EMAIL PROTECTED]
> Cc:
> Subject: Re: [SQL] NULLS and string concatenation
>
> On Fri, Nov 19, 2004 at 11:45:43AM -0600, Bruno Wolff III wrote:
>
neatly with the NULLs in some of the columns.
HTH,
Greg Williamson
DBA
GlobeXplorer LLC
-Original Message-
From: Michael Fuhr [mailto:[EMAIL PROTECTED]
Sent: Fri 11/19/2004 9:53 AM
To: Don Drake; [EMAIL PROTECTED]
Cc:
Subject: Re: [SQL] NULLS and string concatenation
Don Drake <[EMAIL PROTECTED]> writes:
> This is still strange to me. In Oracle, the same query would not
> replace the *entire* string with a NULL, it treats the NULL as a no
> value.
Oracle is a bit, um, standards-challenged. They fail to make a
distinction between an empty string and a NULL, b
On Fri, 19 Nov 2004, Don Drake wrote:
> On Fri, 19 Nov 2004 17:48:34 +, Richard Huxton <[EMAIL PROTECTED]> wrote:
> > Don Drake wrote:
> > > select 'some text, should be null:'|| NULL
> > >
> > > This returns NULL and no other text. Why is that? I wasn't expecting
> > > the "some text.." to
On Fri, 19 Nov 2004 17:48:34 +, Richard Huxton <[EMAIL PROTECTED]> wrote:
> Don Drake wrote:
> > select 'some text, should be null:'|| NULL
> >
> > This returns NULL and no other text. Why is that? I wasn't expecting
> > the "some text.." to disappear altogether.
> >
> > Is this a bug?
>
> N
Don Drake wrote:
select 'some text, should be null:'|| NULL
This returns NULL and no other text. Why is that? I wasn't expecting
the "some text.." to disappear altogether.
Is this a bug?
No. Null is "unknown" if you append unknown (null) to a piece of text,
the result is unknown (null) too.
If
On Fri, Nov 19, 2004 at 11:45:43AM -0600, Bruno Wolff III wrote:
> On Fri, Nov 19, 2004 at 11:12:38 -0600, Don Drake <[EMAIL PROTECTED]> wrote:
> >
> > I was able to work around the problem by using COALESCE (and casting
> > variables since it wants the same data types passed to it).
>
> This is
On Fri, Nov 19, 2004 at 11:12:38 -0600,
Don Drake <[EMAIL PROTECTED]> wrote:
> I have a function that uses an execute statement to insert data into a
> table, I do in my implementation of table partitioning.
>
> Anyway, I ran into trouble when NULL values were being passed in
> (fields are nulla
I have a function that uses an execute statement to insert data into a
table, I do in my implementation of table partitioning.
Anyway, I ran into trouble when NULL values were being passed in
(fields are nullable) and my insert statement turned into a big NULL.
Here's an equivalent statement that
12 matches
Mail list logo