• If you'll take a look at the first link in my signature it'll show you what we'd prefer to be able to help you with coding problems like this. The first step is consumable data and DDL to work from. We're volunteers and usually don't want to rebuild your sample data into something usable.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA