Thanks a lot.
There are very usefull links. Unfortunately I'm not able to rate your perfect post.
by the way
please find answer below for my issue
Code:
USE ABBMeasureHistory
SELECT T1.X,
SUM(CASE T2.Sensor WHEN 4 THEN T2.Val ELSE 0 END) AS Sensor4,
SUM(CASE T2.Sensor WHEN 5 THEN T2.Val ELSE 0 END) AS Sensor5,
SUM(CASE T2.Sensor WHEN 6 THEN T2.Val ELSE 0 END) AS Sensor6,
SUM(CASE T2.Sensor WHEN 7 THEN T2.Val ELSE 0 END) AS Sensor7
FROM Table_1 T1, Table_2 T2
WHERE T1.id_t1 = T2.id_t1 AND T1.id_t1=1001
GROUP BY T1.X
GO
The more I learn SQL the more I am impressed by SQL.
Last edited by Andrzej; August 24th, 2008 at 03:29 PM.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.