How to replace non D values in column with blank
Posted on 2013-05-15
I have this query for joining.
There is field ems, it has numerical values, E or D.
Now how to modify this query where in
if for any record ems is number i,e numeric value or 'E' values it should occur as blank.
and for ems ='D' it should be shown as 'D'
select a1.*,b.photo,b.subjectcode,b.subjectname,b.ems from (select institute,cb,semester,UID,sname,
smobile ,isnull(fmobile,'') as 'fmobile',isnull(fname,'') as fname,isnull(mname,'') as 'mname',
centreno as 'Centreno',centre as 'Centre' from custudents a where cb='MBA' and eflag=1
group by institute,cb,semester,UID,sname,smobile ,isnull(fmobile,''),
isnull(fname,'') ,isnull(mname,'') ,
as a1,mstmassstudents b
where a1.uid=b.uid and a1.cb='MBA'
order by a1.uid,b.subjectcode