• I would take a different path.

    WHERE (p.PartNoAlias='' OR w.PartNoAlias=p.PartNoAlias)

    However, I'm not sure this is the best for your query. Seems like you're trying to do a left join with ANSI-89 syntax. If you post your entire query and possibly DDL and sample data, you could get better help.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2