I have table in data base name "train delay, with columns
train number(int),
DelayTime(int),
DelayReason(nchar)
so the train may have more than one delaytime for each delay reason, for example:
trainnumber,Delaytime,DelayReason
1 ,5 sec ,x
1 ,10 sec ,Z
1 ,70 sec ,TY
I want to create a crystal report with the following design:
trainnumber, delaytime 1,delay reason 1 ,delaytime 2, delay reason 2,delaytime 3,delay reason 3
But I don't know the query which will get me this result.
I have tried this:
select delaytime from dbo.traindelay
But the output looks like this:
Delaytime
5
10
70
And I don't want that. I want something like this:
delaytime1 ,delaytime2 ,delaytime3