It is very long. However, if I place the code
INSERT INTO #Output
exec spt_rep_payable_status '( creditor.account_no in (''S501734'',''S510385'') ) ', NULL, NULL, 'ZLV', '', '', '', '', 0, 0, 'Jul 20 2006', 'N', ',Approved,Paid,Part Paid,', ',Normal,', 'c', 'Y'
It works fine. But the...