ah yes there were a few extra lines

AND (visaudactweight.AuditorID = AuditorNames.AuditorID))
  AND (visaudactweight.CompanyID = CompanyNames.CompanyID))
  AND (visaudactweight.GKprRecID = GateKeeperRecs.GKprRecID))
  AND (GateKeeperRecs.GKeeperID = GKeeperNames.GKeeperID))

but its the AS MATTOTAL which is causing the problem


On 10/21/07, Brian Kotek <[EMAIL PROTECTED]> wrote:
>
> Well unless there is more to the where clause that you didn't paste, all
> those extra parentheses are going to cause an error, in addition to the
> fact
> that you're not joining any of the other tables.
>
> On 10/20/07, Toby King <[EMAIL PROTECTED]> wrote:
> >
> > Hi there
> >
> > I have a query that I have created - it works against a MS-Access
> database
> > but does not work with MySQL. I have searched through the MySQL notes
> that I
> > have but cant find out why - I think its because of the AS MatTotal
> section
> > of the query.
> >
> > Thanks in advance for feedback
> >
> >
> > SELECT visaudactweight.RecID, Sites.SiteName, visaudactweight.VADateTime
> ,
> > CompanyNames.CompanyName, GateKeeperRecs.RegoNo,
> GKeeperNames.GKeeperName,
> > AuditorNames.AuditorName , GateKeeperRecs.NetWeight,
> > (visaudactweight.Asphalt + visaudactweight.Cardboard_CompactedDry +
> > visaudactweight.Cardboard_CompactedWet +
> > visaudactweight.Cardboard_LooseDry + visaudactweight.Cardboard_LooseWet+
> > visaudactweight.Cardboard_Waxed + visaudactweight.Clay +
> > visaudactweight.CleanFill + visaudactweight.Concrete +
> > visaudactweight.Food_Kitchen +
> > visaudactweight.Garbags + visaudactweight.Glass +
> > visaudactweight.Leather_Textiles + visaudactweight.Leather_TextilesFurn+
> > visaudactweight.Leather_TextilesMatt +
> visaudactweight.Leather_TextilesCar+
> > visaudactweight.Metal_Ferrous + visaudactweight.Metal_NonFerrous +
> > visaudactweight.Paper +
> > visaudactweight.Plastic_BagsFilm + visaudactweight.Plastic_Hard +
> > visaudactweight.PlasterBoard + visaudactweight.Polystyrene +
> > visaudactweight.Rocks_Bricks + visaudactweight.Rubble +
> > visaudactweight.Soil + visaudactweight.Tyres_Rubber +
> > visaudactweight.Vegetation_Garden + visaudactweight.Wood_Timber +
> > visaudactweight.Wood_Pallets + visaudactweight.Wood_Fencing +
> > visaudactweight.Wood_Furniture + visaudactweight.Other_CD +
> > visaudactweight.Other_CI + visaudactweight.Hazardous)
> > AS MatTotal, ((MatTotal - 
> > GateKeeperRecs.NetWeight)/GateKeeperRecs.NetWeight)*100
> as PercentDiff
> > FROM visaudactweight, Sites, AuditorNames, CompanyNames, GateKeeperRecs,
> > GKeeperNames
> > WHERE (((((visaudactweight.SiteID = Sites.SiteID)
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291680
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to