From: | Adarsh Sharma <adarsh(dot)sharma(at)orkash(dot)com> |
---|---|
To: | pgsql-general General <pgsql-general(at)postgresql(dot)org> |
Subject: | How to retrieve rows with empty value in numeric(12,8) columns |
Date: | 2011-12-06 10:39:17 |
Message-ID: | 4EDDF0D5.8010705@orkash.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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";"2344818";;;"";"";"";"Bago";"Myanmar"*
"1004608";"MM";"Rangoon
Ahlone";"ENG";"Suburb";"1015662";16.78330000;96.11669900;"";"Yangon";"";"Yangon";"Myanmar"
I want to retrieve that rows that have empty lat lon but I am not able
to create a query for that as in character varying columns we retrieve
that rows with '' value, but this time the data type is different.
I checked the below commands but all fails :-
select * from table where lat =''; ---- error
select * from table where lat <=0;----- no rows
Please guide me if there is a proper query for that.
Thanks
From | Date | Subject | |
---|---|---|---|
Next Message | Adarsh Sharma | 2011-12-06 10:53:24 | Re: How to retrieve rows with empty value in numeric(12,8) columns |
Previous Message | Frank Lanitz | 2011-12-06 10:28:36 | Re: pg_standby: How to check in which state the server is currently? |