ALTER TRIGGER [dbo].[Update_Limit_Day]
ON [dbo].[Data]
AFTER INSERT
AS
DECLARE @date char(8)
DECLARE @stationid int
DECLARE @temp float
DECLARE @humi float
DECLARE @carbon float
DECLARE @alco float
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for trigger here
SELECT @date=CONVERT(char(8),SaveTime) FROM inserted
--SELECT @date=CONVERT(char(8),GETDATE(),102)
SELECT @stationid=StationID FROM inserted
SELECT @temp=Temperature FROM inserted
SELECT @humi=Humidity FROM inserted
SELECT @carbon=CarbonDioxide FROM inserted
SELECT @alco=Alcohol FROM inserted
END