columns by position

  • Thread starter Thread starter JohnZing
  • Start date Start date
J

JohnZing

Hi
i need to do a query like

select max(column1) from MyTable

but, i don't know the column1 name. It could be MemberID, ArticleID.... and
so on...
Is there a way to indicate the column position... something like

select max([1]) from MyTable

Thank you
 
Hi,


Nope, not directly.

SELECT Choose( iparam, field1, field2, field3 ) FROM MyTable


You can use MAX inside, or outside (I imagine it would be faster if inside)
the Choose:

SELECT Choose( iparam, MAX(field1), MAX(field2), MAX(field3) ) FROM myTable



Hoping it may help
Vanderghast, Access MVP
 
Back
Top