This question is locked. New answers and comments are not allowed.
i would use a nested linq query for this select:
select * from T_VERSION ver where (ver.id_file,VER.VERSION) in(select
id_file, max(version) from T_VERSION group by id_file)
suppose there are this field
ID | ID_FILE | VERSION
1 | 1| 1
2 | 1| 2
3 | 1| 3
4 | 2| 1
5 | 2| 2
I would obtain rows: 3 | 1| 3 and 5 | 2| 2 that is max version groupby ID_FILE
i tried with this code but it is wrong
dataprovider => from fileVer in dataprovider
where fileVer.ID == (from ver in dataprovider select ver).Max(u => u.VERSION)
select fileVer).ToList();
it will be use in a win application, c#
can you help me?thanks in advance
select * from T_VERSION ver where (ver.id_file,VER.VERSION) in(select
id_file, max(version) from T_VERSION group by id_file)
suppose there are this field
ID | ID_FILE | VERSION
1 | 1| 1
2 | 1| 2
3 | 1| 3
4 | 2| 1
5 | 2| 2
I would obtain rows: 3 | 1| 3 and 5 | 2| 2 that is max version groupby ID_FILE
i tried with this code but it is wrong
dataprovider => from fileVer in dataprovider
where fileVer.ID == (from ver in dataprovider select ver).Max(u => u.VERSION)
select fileVer).ToList();
it will be use in a win application, c#
can you help me?thanks in advance