Is there some reason it does things this way?
I tried to modify the below script so it would extract balance forward
billing customers as well as the normal bunch but it doesn't seem to work,
anyone done this already?
Geo.
CREATE PROCEDURE RU_RATC AS
SELECT sa.Login, sa.Password, sa.AccountType, MasterExpire=DateAdd(Day,
ma.Extension, maExpireDate),
SubExpire=DateAdd(Day, sa.Extension, saExpireDate)
From MasterAccounts ma, SubAccounts sa
Where ma.CustomerID = sa.CustomerID
AND (maExpireDate >= GetDate() or maExpireDate is NULL) <-this was my
change
AND sa.Login is not null
AND ma.Active = 1 AND sa.Active = 1
AND NOT EXISTS (
Select * From RadConfigs rc where sa.AccountID = rc.AccountID
)
AND EXISTS (
Select * From RadATConfigs at where sa.AccountType = at.AccountType
)
that script appears to do the right thing, but then the following one
doesn't pull the same bunch for everyone with rad attributes
SELECT sa.Login, sa.Password, ra.Name, ra.Type, rc.Data, rc.Value,
rc.RadCheck,
MasterExpire=DateAdd(Day, ma.Extension, maExpireDate),
SubExpire=DateAdd(Day, sa.Extension, saExpireDate)
From MasterAccounts ma, SubAccounts sa, RadConfigs rc, RadAttributes ra
Where ma.CustomerID = sa.CustomerID
AND rc.AccountID = sa.AccountID
AND ra.RadAttributeID = rc.RadAttributeID
AND sa.Login is not null
AND (maExpireDate >= GetDate() or maExpireDate is NULL)
AND ma.Active = 1 AND sa.Active = 1
Order BY sa.Login, rc.RadCheck DESC
For more information about this list (including removal) go to:
http://www.iea-software.com/support/maillists/liststart