|
From: CFMXPrGrmR on 14 Apr 2008 09:08 I'm having a little trouble finding a MAX (or MIN) value of the second dimension in a 2-dimensional Array. I'm doing a query and the first dimension is the column names, the second is the values. I'm trying to pull out the MAX column value in the second dimension. ArrayMax tells me "The array passed cannot contain more than one dimension." Any ideas? I'm sure this is possible.
From: Azadi on 14 Apr 2008 09:55 Interesting... the docs never mention that the array must be a 1D array for arraymax/arraymin/arraysum/etc functions, but i guess that's the case... for you solution: can you get the MAX of all columns as a field in your query? something like: SELECT column, column2, ..., columnN, MAX(column1, column2, ..., columnN) AS maxvalue FROM.... .... then #queryname.maxvalue# will be a 1D array... Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/
From: Dan Bracuk on 14 Apr 2008 10:22 MaxValue = ArrayMax(QueryName["FieldName"]); or Q of Q.
From: CFMXPrGrmR on 14 Apr 2008 11:09 Bingo, thank guys.
|
Pages: 1 Prev: CFPDF and DDX instructions Next: drop down and depending on the selection a email issent |