• jbulldog (4/15/2013)


    Thanks Lowell for the quick reply. But when I altered the code as you presented it the query returned nothing. I would be satisfied if that were the case but I know that there are account portfolios missing this service.

    Best Regards,

    yeah the pseudo code you posted makes it hard to really see any issues.

    use the IF code tags, and paste the real query you are testing with , at a minimum.

    The suggestion about DDL and sample data would allow any of the volunteers here to give you a working, tested solution, instead of guesses.

    you also might consider using CTE's to organize the data , but it really depends on your query.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!