How to design new query to take off invoice?

  • Invoice Date activity activity activity location

    102 14-Mar-06 A SS80 SS70 L20.POD

    102 24-Jul-06 A SS78 L20.POD

    102 21-Aug-06 A AS0630 L15.PS

    102 25-Aug-06 A SS71 L20.POD

    102 01-Sep-06 A SS76 L20.POD

    102 21-Nov-06 A SS74 L20.POD

    105 25-Aug-06 A SS71 L20.POD

    106 01-Sep-06 A SS76 L20.POD

    107 21-Nov-06 A SS74 L20.POD

    How to take off Invoice 102=AS0630 and keep invoice 105,106 and 107.

    Lakh

  • You have 2 activity columns... what are they really called?

    And please... not nice to double post.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Do you want one row per invoice?


    Madhivanan

    Failing to plan is Planning to fail

  • If any invoices matching to code AS0630 that showing me the invoices are paid and take it off my list.

  • Lakhbir.Bhatti (12/30/2008)


    If any invoices matching to code AS0630 that showing me the invoices are paid and take it off my list.

    select * from table as t

    where not exists(select * from table where invoiceno=t.invoiceno and activity='AS0630')


    Madhivanan

    Failing to plan is Planning to fail

  • Thanks

    Lakh

  • Lakhbir.Bhatti (12/30/2008)


    Thanks

    Lakh

    You are welcome 🙂


    Madhivanan

    Failing to plan is Planning to fail

  • Hi Madhivanan,

    This is my query see below.

    Please can you add the missing part for me. i am having erorro message.

    SELECT *

    FROM dbo_pod_surgery

    WHERE phc_id="22/15729";

    Lakh

  • SELECT *

    FROM dbo_pod_surgery

    WHERE phc_id="22/15729";

    If you know activity why r u using phc_id...

    you can directly use the activity in where clause.

  • From my report If this code "AS0630" tell me the person had they money back. I am only looking for people who have not receive they money back.

    Lakh

  • Printing Invoice in Different Design in Tally ERP 9:

  • kichravishankar1 (9/8/2010)


    Printing Invoice in Different Design in Tally ERP 9:

    What is this? 😉


    Madhivanan

    Failing to plan is Planning to fail

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply