K
Kayak
Hi all
i want to make query of data from my x% of the records.i
have done it in two ways but both seems not working with
me.
/////first way
i was using sub query to get 80% of total record then get
the last record of that query using code below. but when i
executed it,a window error "at most one record can be
return by subquery"
SELECT Last(NewTable.IDold) AS IDold
FROM NewTable
HAVING (((Last(NewTable.IDold))=(SELECT TOP 80 PERCENT
NewTable.IDold FROM NewTable
));
/////second way
im using xpercentile query based on
http://www.mvps.org/access/queries/qry0019.htm but i get
error too.i dont know where the missing/error part are
xpercentile : DMin("[IDold]","[Newtable]","DCount
(""*"", """ & [NewTable] & """, """ & [Idold] & "<="" & ["
& [IDold] & " ]) >= " & 0.8*DCount("*",[NewTable]))
please help
i want to make query of data from my x% of the records.i
have done it in two ways but both seems not working with
me.
/////first way
i was using sub query to get 80% of total record then get
the last record of that query using code below. but when i
executed it,a window error "at most one record can be
return by subquery"
SELECT Last(NewTable.IDold) AS IDold
FROM NewTable
HAVING (((Last(NewTable.IDold))=(SELECT TOP 80 PERCENT
NewTable.IDold FROM NewTable

/////second way
im using xpercentile query based on
http://www.mvps.org/access/queries/qry0019.htm but i get
error too.i dont know where the missing/error part are
xpercentile : DMin("[IDold]","[Newtable]","DCount
(""*"", """ & [NewTable] & """, """ & [Idold] & "<="" & ["
& [IDold] & " ]) >= " & 0.8*DCount("*",[NewTable]))
please help