I am running a job to create a tables with timestamp like tablename_2013_02
When I open any table the data consists of that month .
Now I want to create a view so that when I execute a view it shows up all the data of all months.
In general
The code should be
SELECT SiteID, DateTime, TankNumber, ProductCode, DeliveryInProgress, LeakTestInProgress, InvalidFuelHeightAlarm, Volume, TCVolume, Ullage, Height, Water,
Temperature, WaterVolume
FROM dbo.SiteInTankReports_2013_02
UNION ALL
SELECT SiteID, DateTime, TankNumber, ProductCode, DeliveryInProgress, LeakTestInProgress, InvalidFuelHeightAlarm, Volume, TCVolume, Ullage, Height, Water,
Temperature, WaterVolume
FROM dbo.SiteInTankReports_2013_03
How to add april month code to view automatically
Like this
SELECT SiteID, DateTime, TankNumber, ProductCode, DeliveryInProgress, LeakTestInProgress, InvalidFuelHeightAlarm, Volume, TCVolume, Ullage, Height, Water,
Temperature, WaterVolume
FROM dbo.SiteInTankReports_2013_02
UNION ALL
SELECT SiteID, DateTime, TankNumber, ProductCode, DeliveryInProgress, LeakTestInProgress, InvalidFuelHeightAlarm, Volume, TCVolume, Ullage, Height, Water,
Temperature, WaterVolume
FROM dbo.SiteInTankReports_2013_03
UNION ALL
SELECT SiteID, DateTime, TankNumber, ProductCode, DeliveryInProgress, LeakTestInProgress, InvalidFuelHeightAlarm, Volume, TCVolume, Ullage, Height, Water,
Temperature, WaterVolume
FROM dbo.SiteInTankReports_2013_
Is it possible or is there way to do it can you help me in this or give me hint so that I ll try
Many thanks