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
Дата
Msg-id 3ED3290A.7080905@mega-bucks.co.jp
обсуждение исходный текст
Ответ на Query Which is not supposted to list NULLS is listing NULLS also  ("shreedhar" <shreedhar@lucidindia.net>)
Список pgsql-general
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"
Дата:
Сообщение: Re: Query Which is not supposted to list NULLS is listing