Need Help with Oracle-TOAD Query

  • New to SQL and need help. Using Oracle-TOAD. Get an error: ORA-00933 command not properly ended. Thanks!

    select DISTINCT clm_id

    ,SUM(clm_pd_amt) AS c_p_a

    ,MAX(r_date) AS ran_date

    ,MIN(clm_stat) AS c_stat


    WHERE clm_stat in (5,8)

    AND clm_type IN ('r', 'p')

    AND svc_date between '20190101' and '20191231'

    AND pd_date >= '20190101'

    AND pd_date <= '20200131'

    AND year = 2019

    GROUP BY clm_id, clm_pd_amt, r_date, clm_stat

  • This is a double post.  Did none of the answers in the previous thread help?

    The query is identical...


    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply