Get Unique Results in a query.
- by Bathan
Hi guys! Im sure this will be pretty simple for a t-sql guru.
I have the following result from a table
idMain IdSecondary TextValue
1,1,text1
1,2,text2
2,5,text3
2,6,text5
And I want to obtain the first occurence of the idMain only.
THe result should be like this.
idMain,idSecondary,TextValue
1,1,text1
2,5,text3
How can I achieve this?