D
Dos Equis
I am trying to create a query which autocalcs pay for services. SQL is
shown below. The problem area is the AS line and I've added the returns
for ease of reading.
[tbl_Carrier.Type] refers to a lookup field that may be showing text
rather than a number, if so how do I fix it?
SELECT DISTINCTROW qry_AreaByCarrier.CNameFirst,
Count(qry_AreaByCarrier.Area) AS Areas,
Sum(qry_AreaByCarrier.[#ofHomes]) AS Homes,
Sum(qry_AreaByCarrier.[#ofSubHomes])
AS Subscribers, ([#ofHomes]*[tbl_Carrier.Type])+([#ofSubHomes]*0.2) AS
Pay
FROM (tbl_CarierPay INNER JOIN tbl_Carrier ON tbl_CarierPay.Type =
tbl_Carrier.Type) INNER JOIN qry_AreaByCarrier ON
tbl_Carrier.CNameFirst = qry_AreaByCarrier.CNameFirst
GROUP BY qry_AreaByCarrier.CNameFirst;
Thanks,
Byron
shown below. The problem area is the AS line and I've added the returns
for ease of reading.
[tbl_Carrier.Type] refers to a lookup field that may be showing text
rather than a number, if so how do I fix it?
SELECT DISTINCTROW qry_AreaByCarrier.CNameFirst,
Count(qry_AreaByCarrier.Area) AS Areas,
Sum(qry_AreaByCarrier.[#ofHomes]) AS Homes,
Sum(qry_AreaByCarrier.[#ofSubHomes])
AS Subscribers, ([#ofHomes]*[tbl_Carrier.Type])+([#ofSubHomes]*0.2) AS
Pay
FROM (tbl_CarierPay INNER JOIN tbl_Carrier ON tbl_CarierPay.Type =
tbl_Carrier.Type) INNER JOIN qry_AreaByCarrier ON
tbl_Carrier.CNameFirst = qry_AreaByCarrier.CNameFirst
GROUP BY qry_AreaByCarrier.CNameFirst;
Thanks,
Byron