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 |
|
ganeshkumar08
Posting Yak Master
187 Posts |
Posted - 2008-06-18 : 08:53:44
|
| Hi,This is my query(select 0 As 'A',playerID,dbo.fn_ResolvePlayerID(playerID) As 'PlayerName' from trendplayers where player_firstname like 'And%') union (select 1 As 'A','-1', '===================================' As 'PlayerName') union (select 2 As 'A',playerID,dbo.fn_ResolvePlayerID(playerID) As 'PlayerName' from trendplayers)In the above first select statement displays the which has PlayerName like 'And%'second simply displays a like like =======================================and Third select statement must displays the playername with order by PlayerName.But in the above query, i was not able to use ORDER BY in the third select Statement.How can i achieve as below output.0 90 Andrew JOHNSON0 144 Andrew TAYLOR0 152 Andy REID0 230 Andre BIKEY0 243 Andy TODD0 258 Andriy SHEVCHENKO0 287 Andy VAN DER MEYDE1 -1 ===================================2 35 Aaron HUGHES2 296 Aaron LENNON2 363 Aaron MOKOENA2 130 Abdoulaye FAYE2 125 Abdoulaye MEITE2 346 Abou DIABY2 265 Ashley YOUNG2 549 Bacary SAGNA2 3 Belozoglu EMRE2 112 Belozoglu EMRE2 484 Ben BURGESSPlease help me any one you..Solutions are easy. Understanding the problem, now, that's the hard part |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-06-18 : 08:56:30
|
| Where do you want to show data?This kind of formation shoule be done at front end applicationMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|