If you can't do it in a Unix shell you have to write a XSP for the mail part, in the appendix of the "SQL External Routine Programming" there's an example for that.
And because Macro's don't support IF you have to move the logic into a Stored Procedure.
Dieter
↧