Scheduled distribution only if it has data

SOLVED

If I create a scheduled distribution of a worksheet, how can I make it only deliver if it pulls data.  So for example I want to use this as essentially a notification for certain invoice types.  I have the work sheet built and filtered, and it's scheduled to go out daily with prior day data, but it's blank most days.  How do I get it to only send if it's not blank.

Parents Reply
  • 0 in reply to Israel Braunfeld
    Thanks, can you clarify the myfoler.SINVOICE? Our main operating folder is titled production, but when I input from PRODUCTION.GACCENTRYD (using the GL posting of the invoice type) then I get an invalid SQL error.
    @@Yesterday is my global variable for yesterday.
    (select count(*)
    from PRODUCTION.GACCENTRYD
    where GACCENTRYD.TYP_0 = 'CSDIR'
    and GACCENTRYD.ACCDAT_0='@@YESTERDAY')
    >0
Children