Hi,
I need help in developing one SQL for self join View.
My table structure is as follows,
ID Type SeqNo TimeStmp Text
1 N 1 05/01/2003 text1 N
1 N 2 05/02/2003 text2 N
1 B 1 05/01/2003 text1 B
1 B 2 05/03/2003 text2 B
1 B 3 05/05/2003 text3 B
Now i want to develop one view to see data in following format,
ID TextN TextB
1 05/01/2003 - text1 N ## 05/02/2003 - text2 N 05/01/2003 - text1 B ## 05/03/2003 - Text2 B ## 05/05/2003 - text3 B
In this format i want to create single record for each ID and concat all data for same type. If type is N then concat timestamp & Text information for all SeqNo with same ID.
Could anyone please tell me which type of SQL i have to write to get data in this format?
Thanks in Advance,
Raccess
I need help in developing one SQL for self join View.
My table structure is as follows,
ID Type SeqNo TimeStmp Text
1 N 1 05/01/2003 text1 N
1 N 2 05/02/2003 text2 N
1 B 1 05/01/2003 text1 B
1 B 2 05/03/2003 text2 B
1 B 3 05/05/2003 text3 B
Now i want to develop one view to see data in following format,
ID TextN TextB
1 05/01/2003 - text1 N ## 05/02/2003 - text2 N 05/01/2003 - text1 B ## 05/03/2003 - Text2 B ## 05/05/2003 - text3 B
In this format i want to create single record for each ID and concat all data for same type. If type is N then concat timestamp & Text information for all SeqNo with same ID.
Could anyone please tell me which type of SQL i have to write to get data in this format?
Thanks in Advance,
Raccess