Skip to content
Advertisement

SQL Finding result in one table based on a second table

I have two tables and I need to find all invoice that have a ready day of today and have no period in the INumber and all items have not been delivered. Each Invoice may have several rows in Invdetails and I have to find all rows that have a quantity that is not zero.

Here is my SQL, but it takes long time and sometimes hang I don’t know if there is a better way.

Thanks for any help.

Advertisement

Answer

You can also try scoping the tables down before doing the join, so, you’ll be looking at fewer rows…

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement