Keep getting Error.... - Programmers Heaven

Howdy, Stranger!

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

Categories

Keep getting Error....

vb89vb89 Posts: 3Member
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

'FROM TABLE
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

'WHERE CLAUS (FILTERS)
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??

Comments

  • seancampbellseancampbell Pennsylvania, USAPosts: 684Member ✭✭✭
    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.