Keep getting Error....

I keep getting the error: [Oracle][ODBC][Ora]ORA-00907: missing right parenthesis

line 339: Set rsStats = SPSSconn.Execute(tDataSQL)

I added the following to the variable tDataSQL

tDataSQL = tDataSQL &" FROM cd_bk_player_ytd_stats," &_
"(SELECT player_id, team_id, season_id, sum(plus_minus) AS plus_minus" &_
" FROM cd_bk_player_game_stats" &_
" WHERE season_id >="& iSeasonMinPlusMinus &_
" GROUP BY player_id, team_id, season_id) gs"

and just incase here is my where claus

tWhereSQL = " WHERE active_record <> 'R' "&_
" AND game_type_id ="& iGameType &_
" AND split_number = -1" &_
" AND league_id IN ("& iLeagueID &")"&_
" AND player_id = " & iID &_
" AND gs.player_id = player_id" &_
" AND gs.team_id = team_id" &_
" AND gs.season_id = season_id"

Any ideas on what im doing wrong here??


  • seancampbellseancampbell Pennsylvania, USA
    Where is your select statement for this? I see the FROM at the top. I have a suspician that the open Parens is there...

    Also, when you do your Select FROM (SELECT ...) shouldn't there be an AS gs after your (SELECT...)? I am no SQL expert so these are just guesses...

Sign In or Register to comment.

Howdy, Stranger!

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


In this Discussion