Congratulations to AcaCandy on her 100,000th post!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell driver drivers email error ethernet excel firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook 2007 outlook express partition problem router slow software sound trojan usb video virus vista wifi windows windows vista windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
MySQL query failure


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
grinch12's Avatar
Junior Member with 1 posts.
 
Join Date: Sep 2007
Experience: Intermediate
25-Sep-2007, 03:46 PM #1
MySQL query failure
I can get this to work right up until I try to sum the columns. Help!
select `vwcummstats`.`Position` AS `Position`,
`vwcummstats`.`Player` AS `Player`,
`vwcummstats`.`NHLTeam` AS `NHLTeam`,
`vwcummstats`.`Salary` AS `Salary`,
`vwcummstats`.`GP` AS `GP`,
(`vwcummstats`.`GLS` * `ssfhl4_ssfhl`.`tblpointvalues`.`GLS`) AS `GLS`,
(`vwcummstats`.`AST` * `ssfhl4_ssfhl`.`tblpointvalues`.`AST`) AS `AST`,
(`vwcummstats`.`PIM` * `ssfhl4_ssfhl`.`tblpointvalues`.`PIM`) AS `PIM`,
(`vwcummstats`.`PM` * `ssfhl4_ssfhl`.`tblpointvalues`.`PM`) AS `PM`,
(`vwcummstats`.`SHT` * `ssfhl4_ssfhl`.`tblpointvalues`.`SHT`) AS `SHT`,
(`vwcummstats`.`PPG` * `ssfhl4_ssfhl`.`tblpointvalues`.`PPG`) AS `PPG`,
(`vwcummstats`.`SHG` * `ssfhl4_ssfhl`.`tblpointvalues`.`SHG`) AS `SHG`,
(`vwcummstats`.`GWG` * `ssfhl4_ssfhl`.`tblpointvalues`.`GWG`) AS `GWG`,
(`vwcummstats`.`W` * `ssfhl4_ssfhl`.`tblpointvalues`.`W`) AS `W`,
(`vwcummstats`.`L` * `ssfhl4_ssfhl`.`tblpointvalues`.`L`) AS `L`,
(`vwcummstats`.`OTL` * `ssfhl4_ssfhl`.`tblpointvalues`.`OTL`) AS `OTL`,
(`vwcummstats`.`GA` * `ssfhl4_ssfhl`.`tblpointvalues`.`GA`) AS `GA`,
(`vwcummstats`.`SVS` * `ssfhl4_ssfhl`.`tblpointvalues`.`SVS`) AS `SVS`,
(`vwcummstats`.`SO` * `ssfhl4_ssfhl`.`tblpointvalues`.`SO`) AS `SO`,
`vwcummstats`.`FanTeam` AS `FanTeam`,
`vwcummstats`.`AcquireID` AS `AcquireID`,
`vwcummstats`.`PlayerID` AS `PlayerID`,
`vwcummstats`.`WeekNo` AS `WeekNo`,
sum(_utf8'(GLS)+(AST)+(PIM)+(PM)+(SHT)+(PPG)+(SHG)+(GWG)+(W)+(L)+(OTL)+(GA) +(SVS)+(SO)') AS `TTL
from (`ssfhl4_ssfhl`.`tblpointvalues` join `ssfhl4_ssfhl`.`vwcummstats` on((`ssfhl4_ssfhl`.`tblpointvalues`.`Pos` = `vwcummstats`.`Position`))
group by `vwcummstats`.`Position`,
`vwcummstats`.`Player`,
`vwcummstats`.`NHLTeam`,
`vwcummstats`.`Salary`,
`vwcummstats`.`FanTeam`,
`vwcummstats`.`AcquireID`,
`vwcummstats`.`PlayerID`,
`vwcummstats`.`WeekNo`,
`vwcummstats`.`GP`
ehymel's Avatar
Member with 81 posts.
 
Join Date: Aug 2007
Location: Texas
Experience: Enough to impress the family
26-Sep-2007, 12:21 AM #2
Are you getting an error message? That wold help narrow the problem down.

I do notice that at the end of the sum line you have
Code:
AS `TTL
but you should probably end the line with a close quote, as in
Code:
AS `TTL`
.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:50 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.