• Also I am not able to explain here but if needed please tell me if you guys need more info on the table.

    Yes, more info would help a ton. Please post your table DDL along with some sample data (in a readily consumable form) that demonstrates your dilemma. See the article in my signature line for etiquette on posting sample data.

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden