07/09/2011, 05:12
|
| | Fecha de Ingreso: agosto-2008
Mensajes: 56
Antigüedad: 16 años, 4 meses Puntos: 1 | |
Respuesta: Query cruzada SELECT Outstations.Thelabel, PointValue.DataTime, PointValue.DataValue, StrategyList.theLabel
FROM Lans INNER JOIN
Outstations ON Lans.lanID = Outstations.lanID INNER JOIN
StrategyList ON Outstations.outstationID = StrategyList.outstationID INNER JOIN
PointValue ON StrategyList.theIndex = PointValue.PointID INNER JOIN
SiteDetails ON Lans.siteID = SiteDetails.siteID
WHERE (Lans.LanNo = 20) AND (Outstations.NodeAddress= 20) AND (Outstations.Thelabel= 'Hotel Columbus') AND (PointValue.DataTime >= '2011-08-01 00:00:00.000') AND (PointValue.DataTime <='2011-08-31 23:45:00.000')
Quiero que los valores de strategyList.theLabel me aparezcan como columnas y la función pivot no me la coge. |