HI
this is BEHCODE Table in database
Id
|
Behcode
|
Reserve
|
date
|
1
|
1000
|
NO
|
|
2
|
1001
|
YES
|
2012-12-12
|
3
|
1002
|
YES
|
2012-12-13
|
4
|
1003
|
YES
|
2012-12-15
|
5
|
1004
|
NO
|
|
6
|
1005
|
YES
|
2012-12-17
|
7
|
1006
|
NO
|
|
8
|
1007
|
NO
|
|
9
|
1008
|
NO
|
|
in ADMIN.aspx page I define datalist and I want in dataLIst show data of BEHCODE column
I want in dataLIst show behcode that in reserve column's data is ='NO' but I want it show behcode wuth reserve='NO' that are before MAXDATE in DATE column
E.g
in this table I want show these behcode
1000 -1004
these behcode have reserve='NO' and these are behcode that are before 1005 that have MAX datein this table
here I don't want show these behcode 1006-1007-1008
becuse these behcode are after 1005 that have MAxDate
BEST REGARDS