• Hi,

    The last line of your query references @tblAmount but you haven't declared it and given it a type. That's why it's failing.

    Thanks,

    Simon



    MCSE: Data Platform
    MCSE: Business Intelligence
    Follow me on Twitter: @WazzTheBadger
    LinkedIn Profile: Simon Osborne