Re: COPY COMMAND

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: Savita <savita(at)india(dot)hp(dot)com>
Cc: shridhar_daithankar(at)persistent(dot)co(dot)in, pgsql-general(at)postgresql(dot)org
Subject: Re: COPY COMMAND
Date: 2002-11-26 11:53:34
Message-ID: 321300275.1038315214@liza
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Savita,

--On Dienstag, 26. November 2002 17:01 +0530 Savita <savita(at)india(dot)hp(dot)com>
wrote:

> Hi Tino,
>
> These query does not work.

Sorry, was a typo. But it schould at least serve as a hint, shouldnt it? ;)

>From documentation:
---- excerpt ---
To check whether a value is or is not null, use the constructs

expression IS NULL
expression IS NOT NULL
or the equivalent, but nonstandard, constructs

expression ISNULL
expression NOTNULL

Do not write expression = NULL because NULL is not "equal to" NULL. (The
null value represents an unknown value, and it is not known whether two
unknown values are equal.)

Some applications may (incorrectly) require that expression = NULL returns
true if expression evaluates to the null value. To support these
applications, the run-time option transform_null_equals can be turned on
(e.g., SET transform_null_equals TO ON;). PostgreSQL will then convert x =
NULL clauses to x IS NULL. This was the default behavior in releases 6.5
through 7.1.
---- excerpt ---

Regards
Tino

>
> Tino Wildenhain wrote:
>
>> Hi Savita,
>>
>> --On Dienstag, 26. November 2002 16:02 +0530 Savita <savita(at)india(dot)hp(dot)com>
>> wrote:
>>
>> > Hi,
>> > I am able to insert the null field using \N in the text file,but while
>> > retiving the data I am not able to retrive it.
>> >
>> > After inserting data I tried this select statement
>> >
>> > select * from os_customer_master where updated_by=' ';
>> > and
>> > select * from os_customer_master where updated_by=null;
>> >
>> > but it gives 0 rows.then how will I select this values.
>>
>> Nothing to do with copy :)
>> Just try:
>>
>> select * from os_customer_master where isnull updated_by;
>>
>> Regards
>> Tino
>
> --
> Best Regards
> - Savita
> ----------------------------------------------------
> Hewlett Packard (India)
> +91 80 2051288 (Phone)
> 847 1288 (HP Telnet)
> ----------------------------------------------------
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Savita 2002-11-26 12:06:22 Re: COPY COMMAND
Previous Message Nigel J. Andrews 2002-11-26 11:48:57 Re: COPY COMMAND