Re: Query Which is not supposted to list NULLS is listing

Поиск
Список
Период
Сортировка
Искать
От
Jean-Christian Imbeault
Тема
Re: Query Which is not supposted to list NULLS is listing
Дата
в 05:00:24
Msg-id
3ED3290A.7080905@mega-bucks.co.jp
Список
Дерево обсуждения
Re: Query Which is not supposted to list NULLS is listing Jean-Christian Imbeault <jc@mega-bucks.co.jp>
shreedhar wrote:
 > Hello,
 >
 > I am attaching an output with this mail. I am sure that I am not 
inserting
 > '' for jobcomments in any case.


A simple check would be:

SELECT jobcomment from tblJobIncharge where id=51 AND jobcomment IS NOT 
NULL;

If you get back a row then jobcomment is not null and probably has the 
empty string in it ...

To make sure that jobcomment is not '' you can try this query:

SELECT jassignedid, ascii(JobComments) FROM tblJobIncharge WHERE 
JobComments IS NOT NULL AND projectid >= 50 AND projectid <= 100

If jobcomment is '' then you will get '0' in the job comment field, if 
it is really null then you will get '' (i.e. nothing).

So if you get a 0 it means that you have job comment fields with the 
empty string '' in them, they are not null ...

HTH,

Jean-Christian Imbeault

В списке pgsql-general по дате отправления
От: Együd Csaba
Дата:
Сообщение: Re: PostgreSQL 7.3.1 on WinXP
От: Nigel J. Andrews
Дата:
FAQ