I have a table named LOCATION.
It has column like location_id, location_nme, pstl_cd, area_nme.
When am writing below queries giving two rows of output:
1st case:
Select * from Location where location_id= 123;
Output:
location_id location_nme pstl_cd area_nme
123 Ramnagar 721423 Null
123 Ramnagar 721423 Southern
Here we need to pick only the values where area name is not null.
123 Ramnagar 721423 Southern
2nd case:
Select * from Location where location_id= 789;
location_id location_nme pstl_cd area_nme
789 Balisai 700543 Null
Here area_name is coming as null. So if I add in query like where area_nme is not null, the 2nd case will not be satisfied.
Can you please help to write one query, where both the cases will be satisfied.