DeadIslets
Programmer
I'm attempting to create a view with one of the fields in the view being the addition of several fields in a single row. You can see in the code window what I've tried to do but it doesn't work. I realize this is probably a simple question but I very much appreciate your help. Thanks.
Keith
Keith
Code:
CREATE VIEW DelvStat (ZipCode, City, State, Route, Active) AS
SELECT dbo.DeliveryStatistics.ZipCode, dbo.ZipCode.City, dbo.ZipCode.State,
dbo.DeliveryStatistics.CarrierRouteID, (dbo.DeliveryStatistics.ActvBusCentralCnt,
dbo.DeliveryStatistics.ActvBusCurbCnt + dbo.DeliveryStatistics.ActvBusNDCBUCnt) AS Active,
dbo.DeliveryStatistics.ActvBusCentralCnt, dbo.DeliveryStatistics.ActvBusCurbCnt,
dbo.DeliveryStatistics.ActvBusNDCBUCnt
FROM dbo.DeliveryStatistics INNER JOIN
dbo.ZipCode ON dbo.DeliveryStatistics.ZipCode = dbo.ZipCode.ZipCode
WHERE (dbo.DeliveryStatistics.ZipCode = @ZipCode)