Re: [Emerald] initial conversion

Dale E. Reed Jr. ( (no email) )
Tue, 27 Jul 1999 13:32:35 -0700

> Emerald wrote:
>
> Is there an sql script that will go thru the 2.5 database and correct
> the balance for each customer according to the open invoices they
> have?

Run this once and it will show the ones to changes. Then remove the
/* */ from around the update and run it again to actually make
the changes.

DECLARE @custid int, @balance money, @amount money

SET NOCOUNT ON

DECLARE ub_cursor CURSOR
FOR Select CustomerID, Balance