>>
>>From which table ProductCode comes from?
>
>From SalesInvoiceItem, but it should have an alias of IV.
This is why I wish people would post DDL and index definitions. While I don't care for his tactics, Celko jumps all over people on other forums when they post query questions (and code) but don't post DDL.