Re: [GENERAL] How to retrieve rows with empty value in numeric(12,8) columns

2011-12-06 Thread Bèrto ëd Sèra
Hi, > As I understand it, your first query returned nothing because NULL is > simply "unknown" - and since you can never know what it's equal to, > looking for equality with NULL will never find anything. > Yes, you can basically think of NULLs in SQL as having the same role of zeros in division

Re: [GENERAL] How to retrieve rows with empty value in numeric(12,8) columns

2011-12-06 Thread Alban Hertroys
On 6 December 2011 12:00, Adarsh Sharma wrote: >> select * from table where lat IS NULL; > can you explain how it works or any link that explain the difference between > 2 queries. That's because of the 3-valued logic of SQL. x=NULL always evaluates to NULL, because it is unknown whether the t

Re: [GENERAL] How to retrieve rows with empty value in numeric(12,8) columns

2011-12-06 Thread Raymond O'Donnell
On 06/12/2011 11:00, Adarsh Sharma wrote: > try >> >> select * from table where lat IS NULL; >> >> Bèrto > :-) It works, Thanks a lot Berto ! > > can you explain how it works or any link that explain the difference > between 2 queries. As I understand it, your first query returned nothing because

Re: [GENERAL] How to retrieve rows with empty value in numeric(12,8) columns

2011-12-06 Thread Adarsh Sharma
try select * from table where lat IS NULL; Bèrto :-) It works, Thanks a lot Berto ! can you explain how it works or any link that explain the difference between 2 queries. Best regards Adarsh -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your su

Re: [GENERAL] How to retrieve rows with empty value in numeric(12,8) columns

2011-12-06 Thread Adarsh Sharma
select * from table where lat=NULL; Above query also returns 0 rows. Thanks Bèrto ëd Sèra wrote: Hi, haven't checked this personally, but first of all... what if they are simply stored as NULLs? Bèrto On 6 December 2011 13:39, Adarsh Sharma > wrote: D

[GENERAL] How to retrieve rows with empty value in numeric(12,8) columns

2011-12-06 Thread Adarsh Sharma
Dear all, I have a table with more than 10 million rows in a postgresql database. In the table two columns are of type numeric(12,8) and contains lat lon of the locations. But in more than thousand rows values are empty. Below is the snapshot of two rows :- *"1004364";"MM";"Pye";"ENG";"Town"