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 |
|
pritesh1908
Starting Member
4 Posts |
Posted - 2012-03-28 : 10:45:23
|
| how do i fetch only the unique tuples based on a particular atttributefor e.gname movie yramit yoyo 2011prit hoho 2010jeet gogo 2011ajay jojo 2015jeet koko 2018ajay lolo 2011we want only the tuples with unique yri.e.prit hoho 2010ajay jojo 2015jeet koko 2015 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-03-28 : 10:57:46
|
[code]select *from yourtable t inner join ( select yr from yourtable group by yr having count(*) = 1 ) m on t.yr = m.yr [/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
pritesh1908
Starting Member
4 Posts |
Posted - 2012-03-28 : 12:05:45
|
| thanx a lot khtan..that worked |
 |
|
|
|
|
|