Skip to Content
author's profile photo Former Member
Former Member

looping through business partners

I need to run a query that shows which BPs have NOT had a recent delivery. Therefore, I am searching for values not present. I have decided to run a subquery pulling up all deliveries within the last month and then looping through all BPs to see if they are in that query. If not, I want to display their name as part of the result. I am not sure how to loop through BPs in SQL using Query Generator. Any idea of syntax?

Thank you in advance for you help!


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jun 02, 2005 at 07:28 AM

    Hi Jacquie,

    I think this select is what you are looking for:


    Where T0.CardCode Not in

    (SELECT T0.CardCode FROM OINV T1

    WHERE datediff(Day,T1.DocDate, getdate())<30)

    Hope that helps,

    Ibai Peñ

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.