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 |
|
SQLSeeker
Starting Member
15 Posts |
Posted - 2010-04-16 : 07:17:23
|
| Hi, I have two tables say City(Master) and Location(Detail). I want to populate record set which display first row from City and then all locations.The View has to like this: 1 City1 2 location11 3 location12 4 City2 5 location21 6 location22Is it Possible through SQL StatementThanks |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-04-16 : 07:19:38
|
Do that in your fron end.That is not what T-Sql is made for. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2010-04-16 : 07:41:49
|
| You *can* do it using ranking functions like ROW_NUMBER()But as Webfred said do it in the application layer -- this is trivially easy to do in an application by just horizontal parsing of the result sets.Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
|
Sachin.Nand
2937 Posts |
|
|
SQLSeeker
Starting Member
15 Posts |
Posted - 2010-04-19 : 01:55:22
|
| Hi Idera, Thanks for your help, Its really helpful.Thanks |
 |
|
|
|
|
|