I am having troubles to sum these 2 variables into one. I have tried many combinations of the code below but nothing seems to work...
--Query for data
SET @raw_gallons = (SELECT raw_gallons FROM impregnation.dbo.tank_raw)
SET @day_gallons = (SELECT day_gallons FROM impregnation.dbo.tank_day)
SET @Combined_Levels = (select SUM(@raw_gallons + @day_gallons))
SET @Combined_Levels = SUM(@raw_gallons + @day_gallons)
SET @Combined_Levels = (@raw_gallons + @day_gallons)
Thanks to all for your suggestions and help.
--Query for data
SET @raw_gallons = (SELECT raw_gallons FROM impregnation.dbo.tank_raw)
SET @day_gallons = (SELECT day_gallons FROM impregnation.dbo.tank_day)
SET @Combined_Levels = (select SUM(@raw_gallons + @day_gallons))
SET @Combined_Levels = SUM(@raw_gallons + @day_gallons)
SET @Combined_Levels = (@raw_gallons + @day_gallons)
Thanks to all for your suggestions and help.