$ 0 0 Thanks Dubravko Katulic for the replies. I am able to get the correct ouput by using the case statement query provided above