Re: Consolidation

Dale E. Reed Jr. ( (no email) )
Fri, 30 May 1997 02:47:32 -0700

David Khoury wrote:
>
> Yep ... glad I'm not the only one to have noticed the problem :) I
> thought our system was going crazy because some consolidation data was
> incorrect and yet there were no posts on the list about it.

Its one of those things that if you really don't look at it
closely, you won't see it.

> In any case, I'm currently writing my own consolidation routines now in
> Visual Basic. I'm practically done now. The only vexing question I have
> comes from the trace of the SQL calls during a test consolidation here.
> After every single "INSERT INTO Charges" statement, there is a following
> statement:
>
> "Select LastIdentity=@@IDENTITY"
>
> OK, so this selects the identity of the last row inserted into the charges
> table, but what is this used for?? I can't seem to find any reason for it.
> Am I overlooking something really simple??
>
> I'd appreciate any answer that anyone can provide.

You are right, this finds the indentify of the Charge. This is needed
so that
when the CallHistory entry is made, the ChargeID can be stored with it.

> I can mail anyone the code for my consolidation routine if they want it.
> Just mail me and I'll send it when it's ready (any day now :).

Gotta love an open solution like Emerald. Isn't reverse enginerring
illegal our something? I'd love to shoot the person that invented
SQL trace! Guess I will have to start using encrypted stored
procedures for this stuff. :)

The Emerald 2.2 consolidation code is corrected, and includes several
new
additions to handle large calls table (to try and prevent log full
errors,
etc. We can not gurantee accuracy or behavior in a setup where you are
externally manipulating mainstream events like this.

-- Dale E. Reed Jr.  (daler@iea.com)_________________________________________________________________       IEA Software, Inc.      |  RadiusNT, Emerald, and NT FAQs Internet Solutions for Today  |    http://www.emerald.iea.com