I actually want to return all the not null records if my obj_type is null. I dont want to return the first not null records.
For example I have 50 records in the table totally
if my obj_type is null I want to return all 50 records.
By using coalesce it is returning only couple of records say 25 which it chooses objtype as 'proc' which is first not null record in table.
How can I select all records