ChewDoggie
Programmer
G'day all!
I've searched the archives but nothing seems to fit my issue (exactly), so I'm posting anew.
I'm trying to sort on a text field (called 'Comp') which contains numbers and/or letters and/or special characters. 'Comp' field length = 4. Right now, I'm using a shaped query to produce the resultset in order of "Comp" but I'd like to modify the query to "properly" sort the 'Comp' text field.
The current sorting creates output like this:
1
2
3
38
39
3A
4
...etc.
which should look like:
1
2
3
3A
4
38
39
Here's what my query looks like currently:
But don't let the above query fool you. I learned how to do shaped queries but really, I'm no good with the Access query syntax, so any help would be greatly appreciated!
AMACycle
American Motorcyclist Association
I've searched the archives but nothing seems to fit my issue (exactly), so I'm posting anew.
I'm trying to sort on a text field (called 'Comp') which contains numbers and/or letters and/or special characters. 'Comp' field length = 4. Right now, I'm using a shaped query to produce the resultset in order of "Comp" but I'd like to modify the query to "properly" sort the 'Comp' text field.
The current sorting creates output like this:
1
2
3
38
39
3A
4
...etc.
which should look like:
1
2
3
3A
4
38
39
Here's what my query looks like currently:
Code:
sql = "SHAPE {SELECT trim(ventrylist.fname) + ' ' + trim(ventrylist.lname) as fullName, trim(ventrylist.city) + ', ' + trim(ventrylist.state) as hometown, brands.brandid + IIf(ventrylist.bikesize = '' or ventrylist.bikesize = '0', '', ' - ' + ventrylist.bikesize + ' cc') as bike, ventrylist.sponsors, ventrylist.description, ventrylist.classid, ventrylist.comp, IIF((racer.bdayyy + racer.bdaymm) > 0, Int((DateDiff('d', (bdaymm & '/1/' & bdayyy), Date()) / 365.25)), 'N/A') as RacerAge FROM ((vEntryList LEFT JOIN brands on brands.brandname = ventrylist.brandname) INNER JOIN racer on racer.racerid = ventrylist.racerid) where ventrylist.eventid = " & entId & " and ventrylist.status = 'Y' order by ventrylist.comp} AS vEntryList COMPUTE vEntryList BY 'description', 'ClassID'"
But don't let the above query fool you. I learned how to do shaped queries but really, I'm no good with the Access query syntax, so any help would be greatly appreciated!
AMACycle
American Motorcyclist Association