Another Query Issue

novice

Registered User.
Local time
Today, 14:25
Joined
Jun 3, 2009
Messages
32
Hi,

I have two tables
T1 T2
TID | Len TID | Len2
22 2 22 3
22 4

I need a query to display
TID | Len | DiffLen1 | DiffLen2.....|DiffLenn
22 2 1(3-2) 2(4-2) ....

I'm able to write a query as below:
SELECT T1.TID, T1.Len, T2.Len2-T1.Len FROM T1 INNER JOIN T2 ON T1.TID = T2.TID;

But this display entries as below;
TID | Len | DiffLen
22 2 1(3-2)
22 2 2(4-2)
....
22 2 ....

How can i change my query to display as above (in a single row). Please let me know. Thanks.
 

Users who are viewing this thread

Back
Top Bottom