T
terry
My assignment's due date is approaching. I'm nervous now!
How can I build this sql statement in a function:
SELECT LAST(fieldName)
FROM (SELECT TOP p PERCENT fieldName
FROM tblName
WHERE fieldName is not null
ORDER BY fieldName);
fieldName, tblName, p are input variables of the function.
Thanks a lot!
Mine is: Set ssMedian = MedianDB.OpenRecordset
("select last ( [" & fldName & "] ) from (SELECT TOP [ "
& p & "] percent [" & fldName & _
"] FROM [" & tName & "] WHERE [" & fldName & _
"] IS NOT NULL ORDER BY [" & fldName & "]);")
i got some error complaining this sql.
How can I build this sql statement in a function:
SELECT LAST(fieldName)
FROM (SELECT TOP p PERCENT fieldName
FROM tblName
WHERE fieldName is not null
ORDER BY fieldName);
fieldName, tblName, p are input variables of the function.
Thanks a lot!
Mine is: Set ssMedian = MedianDB.OpenRecordset
("select last ( [" & fldName & "] ) from (SELECT TOP [ "
& p & "] percent [" & fldName & _
"] FROM [" & tName & "] WHERE [" & fldName & _
"] IS NOT NULL ORDER BY [" & fldName & "]);")
i got some error complaining this sql.