Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 dont select rows that have empty cells

Author  Topic 

grimmus
Yak Posting Veteran

53 Posts

Posted - 2008-01-08 : 16:58:52
Hi,

I am trying to select GeoLatitude and GeoLongitude values for an establishment, some of the establishments dont have the GeoLatitude and GeoLongitude values entered. How can i avoid selecting these rows ?

SQL:

select e.EstablishmentName,e.GeoLatitude,e.GeoLongitude from establishments e
inner join establishmentArea ea ON
ea.establishmentID = e.establishmentID
WHERE ea.locationCode = '10'

Thanks in advance

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2008-01-08 : 17:23:25
[code]
...
WHERE ea.locationCode = '10'
AND e.GeoLatitude IS NOT NULL
AND e.GeoLongitude IS NOT NULL
[/code]

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page
   

- Advertisement -