Skip to Content
J S

Vendor List

Hi

I want Vendor List from whom nothing has been purchased for last 1 year

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jul 22, 2020 at 01:26 PM

    Hi,

    Try this query,

    SELECT T0.[CardCode], T0.[CardName] FROM OCRD T0 WHERE T0.[CardType] = 'S' and T0.[CardCode] NOT IN (select t0.cardcode from OPOR T0 where year(T0.Docdate) > 2019)

    Regards,

    Nagarajan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 22, 2020 at 02:16 PM

    Hi,

    Try this query,

    SELECT T0.[CardCode], T0.[CardName] FROM OCRD T0 WHERE T0.[CardType] = 'S' and (T0.[CardCode] NOT IN (select t0.cardcode from OPOR T0 where year(T0.Docdate) > 2019) OR T0.[CardCode] NOT IN (select t0.cardcode from OPCH T0 where year(T0.Docdate) > 2019))

    Regards,

    Nagarajan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 22, 2020 at 11:32 PM

    Hi,

    Try this,

    SELECT T0.[CardCode], T0.[CardName] FROM OCRD T0 WHERE T0.[CardType] = 'S' and (T0.[CardCode] NOT IN (select t0.cardcode from OPOR T0 where year(T0.Docdate) > 2019) AND T0.[CardCode] NOT IN (select t0.cardcode from OPCH T0 where year(T0.Docdate) > 2019))

    Regards,

    Nagarajan

    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.