Re: Call History script

Dale E. Reed Jr. ( (no email) )
Fri, 5 Jun 1998 11:37:44 -0700 ()

On Fri, 5 Jun 1998, jmercer wrote:

> Now the error is No destination field name in INSERT INTO statement
> (CallDate='5-1-98').
>
> What fields should be in the CallHistory Table I'm using the enhanced db
> file from the ftp site but I'm not sure it has all the required fields.

Your CallHistory table should have three fields:

Username (text)
CallDate (date/time)
Mins (number, long)

You could put others in if you wanted more information.

> >Insert Into CallHistory
> >Select Username, CallDate='5/1/98', Mins=Sum(AcctSessionTime/60+1)
> >From Calls
> >Where CalLDate >= '5/1/98'
> > and CallDate < '6/1/98'
> > and AcctStatusType = 2
> >Group By UserName
> >Order By Username

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