D
Dim
Need some help with SQL
In my tbl.. i save some document data.
A document always start with revision 1. if dokument is approwed it's locked
and forgotten
but if it aint, it will be remade and will have revision nr 2 alla other
data may be the same as rev. 1
some may even get remade/updated to rev 10-11... follow me so far?
so how do i select all rows with most current revision ????
mytable
ID docname author revision date
1 doc1 me 1 xxx-xx-xx
2 doc1 me 2 xxx-xx-xx
3 doc2 him 1 xxx-xx-xx
4 doc3 me 1 xxx-xx-xx
5 doc3 me 2 xxx-xx-xx
6 doc3 him 3 xxx-xx-xx
7 doc3 me 4 xxx-xx-xx
8 doc4 me 1 xxx-xx-xx
9 doc4 him 2 xxx-xx-xx
here i want some sql that select rows with most current revision and in this
example it would return 4 rows
id 2, id 3, id 7 and id 9
Thx in advance
In my tbl.. i save some document data.
A document always start with revision 1. if dokument is approwed it's locked
and forgotten
but if it aint, it will be remade and will have revision nr 2 alla other
data may be the same as rev. 1
some may even get remade/updated to rev 10-11... follow me so far?
so how do i select all rows with most current revision ????
mytable
ID docname author revision date
1 doc1 me 1 xxx-xx-xx
2 doc1 me 2 xxx-xx-xx
3 doc2 him 1 xxx-xx-xx
4 doc3 me 1 xxx-xx-xx
5 doc3 me 2 xxx-xx-xx
6 doc3 him 3 xxx-xx-xx
7 doc3 me 4 xxx-xx-xx
8 doc4 me 1 xxx-xx-xx
9 doc4 him 2 xxx-xx-xx
here i want some sql that select rows with most current revision and in this
example it would return 4 rows
id 2, id 3, id 7 and id 9
Thx in advance