I have this table :
Name | Date | Para1|
N1 | 01/10| 1 |
N2 | 02/10| 8 |
N2 | 04/10| 7 |
N3 | 05/10| 6 |
I would like to select some name as parameter : @Name = ‘N1,N2’ and only the sooner parameter para 1 so as output i will have :
N1 | 1|
N2 | 8|
I tried that :
SELECT TOP 1 Para1 From MyTable where Name IN ( @Name) ORDER BY Date ASC
Put the part IN (@Name) does see Name as a whole word when I ask for Name = ‘N1,N2’
Any idea how I can do that ?
Thanks
1 Answer