SQL by field position - How

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I need to get a count on a field and I need to use the field position.
How do I do this in the SQL statement?

My code:
str_grpCnt = "SELECT Fields(" & int_Column & ") as my_Group,
Count(Fields(0)) as grp_Totals " & _
"FROM [" & str_ThisFile & "] " & _
"GROUP BY Fields(" & int_Column & ")"

I cannot use a Schema.ini. I need to use the field positon because the
incoming csv text file could have a different number of fields each
time, and I need to give the user the ability to choose which field/
column to group by. Also, the incoming field will be in various
folders.

TIA

- Daron
.