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 |
|
cutepraba
Yak Posting Veteran
53 Posts |
Posted - 2009-06-06 : 09:06:45
|
| how to join these to snigle sqlselect * from table where id="100"select top 10 * from table where id="200"____________Praba |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-06-06 : 09:15:29
|
how do you want to join them ?UNION the result set ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
cutepraba
Yak Posting Veteran
53 Posts |
Posted - 2009-06-06 : 09:20:44
|
| I want to merge the rows, all the rows from first sql and top 10 from second sql. That will be to adogrid.Both sql from one single table____________Praba |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-06-06 : 09:21:24
|
use UNION ALL KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-07 : 03:35:02
|
if you're using sql 2005 you can use just thisselect row_number() over (partition by id order by id) as seq,* from table where id in ("100","200")and (seq <=10 or id="100") |
 |
|
|
|
|
|