holtzy
01-13-2004, 03:17 PM
After reading several threads about union queries I came up with this:
"SELECT Sum(views) AS SumViews1 FROM Vehicles Where O_AirBag = 'true' UNION SELECT Sum(views) AS SumViews2 FROM Vehicles Where O_DualAirBag = 'true'"
but it errors out. If I run it without the union, and run each sql statement seperately they run fine. Why isn't the union working? Any ideas?
"SELECT Sum(views) AS SumViews1 FROM Vehicles Where O_AirBag = 'true' UNION SELECT Sum(views) AS SumViews2 FROM Vehicles Where O_DualAirBag = 'true'"
but it errors out. If I run it without the union, and run each sql statement seperately they run fine. Why isn't the union working? Any ideas?