Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shaped recorrdset

Status
Not open for further replies.

ChewDoggie

Programmer
Mar 14, 2005
604
US
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:

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top