RE: [Emerald] Counting Calls

Malcolm Joosse ( (no email) )
Thu, 17 Feb 2000 11:18:52 +1100

Josh,
I am running SQL6.5 not 7 (sorry)
I tried to run the script but I have VERY little knowlage of SQL. I am
trying to find a contractor to help me with SQL.

I go the following error:
Msg 207, Level 16, State 2
Invalid column name 'UserName'.
Msg 207, Level 16, State 2
Invalid column name 'username'.
Msg 207, Level 16, State 2
Invalid column name 'acctstatustype'.
Msg 207, Level 16, State 2
Invalid column name 'calldate'.
Msg 207, Level 16, State 2
Invalid column name 'calldate'.
Msg 207, Level 16, State 2
Invalid column name 'AcctSessionTime'.
Msg 207, Level 16, State 2
Invalid column name 'acctstatustype'.
Msg 207, Level 16, State 2
Invalid column name 'calldate'.
Msg 207, Level 16, State 2
Invalid column name 'calldate'.

Any suggestions ?
Thank you
Malcolm

-----Original Message-----
From: emerald-request@iea-software.com
[mailto:emerald-request@iea-software.com]On Behalf Of Josh Hillman
Sent: Thursday, February 17, 2000 1:37 AM
To: emerald@iea-software.com
Subject: Re: [Emerald] Counting Calls

From: Malcolm Joosse <malcolm@hotline.net.au>
> Our beloved Telco has started charging timed calls illegally and it seems
> some of my modem customers have been affected.
> I have Emerald 2.5 and Crystal 7 pro but have no idea how to use Crystal
> except to design invoices.
> Can someone please tell me how I can extract the amount of calls by
> customers I know the info is there.
> Can someone please also point me to a how to use Crystal book or video
> etc....
> I am currently counting the calls in the Time-On area and some are making
> >200 per month and it is taking awhile to count.

Maybe the SQL script below would help? Run it in ISQL (Query Analyzer in
SQL 7):

select distinct UserName,
Sessions=count(username),
'Session Time (seconds)'=sum(AcctSessionTime)
from calls
where acctstatustype=2
and calldate between '1/1/2000' and '2/1/2000'
group by username

Josh

For more information about this list (including removal) go to:
http://www.iea-software.com/support/maillists/liststart

For more information about this list (including removal) go to:
http://www.iea-software.com/support/maillists/liststart