Howdy, Stranger!

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

Categories

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.

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.