Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
SQLGuruji
Starting Member
6 Posts |
Posted - 2010-01-10 : 13:52:37
|
| Hello,I need help in writing a query to display table data. The structure of data as follows:TableA:BookID BookName ChapNo ChapName ExID ExName1 abcd 1 xyz 5 bbp1 abcd 1 xyz 6 ppo1 abcd 2 zoq 4 oop2 efgh 1 ffg 3 rrt2 gghf 1 clk 9 crtI want to display data like:BookID: 1 --- BookName: abcdChapter No. 1 --- xyzExerciseID: 5 --- Exercise Name: bbpExerciseID: 6 --- Exercise Name: ppoChapter No. 2 --- Chapter Name: zoqExerciseID: 4 --- Exercise Name: oopBookID: 2 --- BookName: efghChapter No. 1 --- ffgExerciseID: 3 --- Exercise Name: rrtExerciseID: 9 --- Exercise Name: crtCan any help me write query to display the results as required, thanks. |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2010-01-10 : 14:17:29
|
| You can't do in SQL Query.You need to use reporting Layout tools for it. |
 |
|
|
slimt_slimt
Aged Yak Warrior
746 Posts |
Posted - 2010-01-10 : 17:09:56
|
| your result can be queried but query might get very long. is this something you need dynamic or static? if later, code can be written, otherwise, use ReprotingServices or 3-party application for displaying data. |
 |
|
|
|
|
|