Adding new Column's - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Adding new Column's

vb89vb89 Posts: 3Member
I tried to add two new columns to my current coding (they're in bold):

tTotalSQL = " replace(to_char(((sum(decode(minutes_seconds,null,minutes*60,minutes_seconds)) - (mod(sum(decode(minutes_seconds,null,minutes*60,minutes_seconds)),60)))/60),'999999990'),' ','')||decode(sum(minutes_seconds),null,'',':')||decode(sum(minutes_seconds),null,'',replace(to_char(mod(sum(decode(minutes_seconds,null,0,minutes_seconds)),60),'00'),' ','')) AS col0," &_
" sum(field_goals_made) AS col1," &_
" sum(field_goals_att) AS col2," &_
" DECODE(sum(field_goals_att),0,'-',to_char(sum(field_goals_made)/sum(field_goals_att),'9.900')) AS col3," &_
" sum(three_point_made) AS col4," &_
" sum(three_point_att) AS col5," &_
" sum(free_throws_made) AS col6," &_
" sum(free_throws_att) AS col7," &_
" DECODE(sum(free_throws_att),0,'-',to_char(sum(free_throws_made)/sum(free_throws_att),'9.900')) AS col8," &_
" sum(offensive_rebounds) AS col9," &_
" sum(defensive_rebounds) AS col10," &_
" sum(total_rebounds) AS col11," &_
" sum(assists) AS col12," &_
" sum(steals) AS col13," &_
" sum(blocks) AS col14," &_
" sum(turnovers) AS col15, " &_
" sum(personal_fouls) AS col16," &_
" sum(plus_minus) AS col17," &_
" sum(points) AS col18," &_
" sum(games) AS GP, sum(games_started) AS GS," &_
" DECODE(sum(games),0,'-',to_char(sum(points)/sum(games),'990.0')) AS avgpts," &_
" DECODE(sum(three_point_att),0,'-',to_char(sum(three_point_made)/sum(three_point_att),'9.900')) AS pct3p," &_
" sum(disqualifications) AS DQ, sum(technical_foul) AS Tech," &_
" sum(flagrant_fouls) AS Flag, sum(ejections) AS Eject," &_
" DECODE(sum(turnovers),0,'-',to_char(sum(assists)/sum(turnovers),'990.00')) AS ast_to," &_
" DECODE(sum(turnovers),0,'-',to_char(sum(steals)/sum(turnovers),'990.00')) AS stl_to," &_
" DECODE(sum(games),0,'-',to_char(sum(points+assists+total_rebounds)/sum(games),'990.0')) AS PAR_G," &_
[b] " DECODE(sum(games),0,'-',to_char(sum(plus_minus)/sum(games),'990.0')) AS +/-PAR_G," &_[/b]
" DECODE(sum(minutes),0,'-',to_char(sum(points+assists+total_rebounds)*48/sum(minutes),'990.0')) AS PAR_48," &_
[b] " DECODE(sum(minutes),0,'-',to_char(sum(plus_minus)*48/sum(minutes),'990.0')) AS +/-PAR_48," &_[/b]
" DECODE(sum(field_goals_att),0,'-',to_char(sum(field_goals_made+ 0.5*three_point_made)/sum(field_goals_att),'9.900')) AS TSP"

And for some reason the code throws an error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Oracle][ODBC][Ora]ORA-00923: FROM keyword not found where expected

/data/nba/players/player_logs_test.asp, line 517

But this doesn't really make sense to me as the code on line 517/518 is:
517:Set rsTotals = SPSSconn.Execute(tTotalSQL)
518: response.Write("")

Any ideas?
Sign In or Register to comment.