Website.VehicleTemperatures
Documentation | WideWorldImporters |
Schema | Website |
Name | VehicleTemperatures |
Module | Website |
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | VehicleTemperatureID | bigint | Identity | Instantaneous temperature readings for vehicle freezers and chillers | ||||
Instantaneous temperature readings for vehicle freezers and chillers Identity |
||||||||
2 | VehicleRegistration | nvarchar(20) | Vehicle registration number | |||||
Vehicle registration number |
||||||||
3 | ChillerSensorNumber | int | Cold room sensor number | |||||
Cold room sensor number |
||||||||
4 | RecordedWhen | datetime2(7) | Time when this temperature recording was taken | |||||
Time when this temperature recording was taken |
||||||||
5 | Temperature | decimal(10, 2) | Temperature at the time of recording | |||||
Temperature at the time of recording |
||||||||
6 | FullSensorData | nvarchar(1000) | Data received from sensor | |||||
Data received from sensor |
Script
CREATE VIEW Website.VehicleTemperatures AS SELECT vt.VehicleTemperatureID, vt.VehicleRegistration, vt.ChillerSensorNumber, vt.RecordedWhen, vt.Temperature, CASE WHEN vt.IsCompressed <> 0 THEN CAST(DECOMPRESS(vt.CompressedSensorData) AS nvarchar(1000)) ELSE vt.FullSensorData END AS FullSensorData FROM Warehouse.VehicleTemperatures AS vt; |
Exported: 2019-02-04 23:04, Last imported: 2018-08-10 09:51