ChewDoggie
Programmer
G'morning all!
I have a shaped query going to an Access db that is displaying some strange data as the "RacerAge". When I strip out the raw query and execute it in Access, it displays the "RacerAge" correctly. But as soon as I insert it into the shaped query, the data becomes skewed.
The "raw" query looks like this:
The shaped query looks like this:
The raw query produces a RacerAge of "25", the shaped query produces a RacerAge of "24804".
Any help would be greatly appreciated.
AMACycle
American Motorcyclist Association
I have a shaped query going to an Access db that is displaying some strange data as the "RacerAge". When I strip out the raw query and execute it in Access, it displays the "RacerAge" correctly. But as soon as I insert it into the shaped query, the data becomes skewed.
The "raw" query looks like this:
Code:
SELECT rtrim(ventrylist.fname) + ' ' + rtrim(ventrylist.lname) as fullName, ventrylist.racerid, rtrim(ventrylist.city) + ', ' + rtrim(ventrylist.state) as hometown, rtrim(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)), ' ') as RacerAge FROM ((vEntryList INNER JOIN brands on brands.brandname = ventrylist.brandname) INNER JOIN racer on racer.racerid = ventrylist.racerid) where ventrylist.eventid=97 and ventrylist.status = 'Y' order by ventrylist.classid, ventrylist.comp
The shaped query looks like this:
Code:
SHAPE {SELECT rtrim(ventrylist.fname) + ' ' + rtrim(ventrylist.lname) as fullName, ventrylist.racerid, rtrim(ventrylist.city) + ', ' + rtrim(ventrylist.state) as hometown, rtrim(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)), ' ') as RacerAge FROM ((vEntryList INNER JOIN brands on brands.brandname = ventrylist.brandname) INNER JOIN racer on racer.racerid = ventrylist.racerid) where ventrylist.eventid=97 and ventrylist.status = 'Y' order by ventrylist.classid, ventrylist.comp} AS vEntryList COMPUTE vEntryList BY 'description', 'ClassID'
The raw query produces a RacerAge of "25", the shaped query produces a RacerAge of "24804".
Any help would be greatly appreciated.
AMACycle
American Motorcyclist Association