Laatste mutatie op crediteuren

Onderstaande query toont een lijst met crediteuren inclusief de laatste mutatiedatum. Crediteuren zonder mutaties krijgen mutatiedatum 1-1-1900 mee.


SELECT Max(gbkmut.datum) AS lastdate,

c2.crdcode        AS CrdNr,

c2.cmp_name       AS NAME,

c2.cmp_type       AS Type,

c2.cmp_status     AS status

FROM   gbkmut

JOIN cicmpy c2

ON gbkmut.crdnr = c2.crdnr

AND c2.crdnr IS NOT NULL

AND gbkmut.debnr IS NULL

WHERE  gbkmut.transtype IN ( ‘N’, ‘C’, ‘P’ )

AND bud_vers IS NULL

AND gbkmut.remindercount <= 10

AND gbkmut.bkstnr IS NOT NULL

AND gbkmut.oorsprong <> ‘S’

AND Isnull(gbkmut.transsubtype, ) <> ‘X’

GROUP  BY gbkmut.crdnr,

c2.crdcode,

c2.cmp_name,

c2.cmp_type,

c2.cmp_status

UNION ALL

SELECT ‘1900-01-01 00:00:00.000’,

crdcode,

cmp_name,

cmp_type,

cmp_status

FROM   cicmpy

WHERE  crdnr IS NOT NULL

AND debnr IS NULL

AND crdnr NOT IN (SELECT crdnr

FROM   gbkmut

WHERE  gbkmut.transtype IN ( ‘N’, ‘C’, ‘P’ )

AND bud_vers IS NULL

AND gbkmut.remindercount <= 10

AND gbkmut.bkstnr IS NOT NULL

AND gbkmut.oorsprong <> ‘S’

AND Isnull(gbkmut.transsubtype, ) <> ‘X’

AND gbkmut.crdnr IS NOT NULL)

9 Responses to “Laatste mutatie op crediteuren”

  1. MatthewCheli August 12, 2020 at 8:31 am #

    скачать казино икс

    casino x официальный сайт

  2. answers August 12, 2020 at 8:35 am #

    I liked as much as you’ll receive carried
    out proper here. The comic strip is attractive, your authored material stylish.
    nevertheless, you command get bought an shakiness over that you would like be handing over the following.
    ill indubitably come more formerly once more as exactly the similar just about
    very steadily inside case you protect this increase.

    my web blog; answers

  3. zoofruocm August 12, 2020 at 11:07 am #

    Круто + за пост
    _________________
    игровые автоматы i за реальные деньги

  4. HowardFup August 12, 2020 at 12:36 pm #

    Summer Toddler Kids Baby Girls Sleeveless Rainbow Romper Bodysuit Jumpsuit Sunsuit Outfits Clothes

    WaterWipes Sensitive Baby Wipes, Unscented, 540 Count (9 Packs of 60)

  5. Victorreept August 12, 2020 at 3:38 pm #

    try this site https://hydra20original.com

  6. oktszlmw August 12, 2020 at 8:43 pm #

    is there a generic cialis cheap cialis pills buying cialis online reviews

  7. Christian August 12, 2020 at 11:23 pm #

    Hello There. I found your blog using msn. This is an extremely well written article.
    I’ll be sure to bookmark it and return to read more of
    your useful info. Thanks for the post. I will definitely return.

    Also visit my web page … answers (Christian)

Leave a Reply