1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[stackoverflow] [progress Openedge Abl] Sql (in Progress Database) - How To Use Where...

Discussion in 'Stackoverflow tagged OpenEdge or Progress-4GL/DB' started by modhorat, May 19, 2017.

Thread Status:
Not open for further replies.
  1. modhorat

    modhorat Guest

    I'm pretty new to SQL, I've been using SQL on a Progress Database, I have the following code below:

    Select pub."GL_Table"."AccNum_Col", pub."GL_Table"."AccMnth_Col", Sum(pub."GL_Table"."Amount_Col"), ROUND((pub."GL_Table"."AccMnth_Col")/100,0) AS "Year", MOD(pub."GL_Table"."AccMnth_Col",100) As "Month"
    FROM pub."GL_Table"
    GROUP BY pub."GL_Table"."AccNum_Col", pub."GL_Table"."AccMnth_Col"
    ORDER BY pub."GL_Table"."AccNum_Col", pub."GL_Table"."AccMnth_Col"


    I want to only display only those rows with "Year" 2017

    I have tried the below (but I receive errors):

    Select * FROM (
    Select pub."GL_Table"."AccNum_Col", pub."GL_Table"."AccMnth_Col", Sum(pub."GL_Table"."Amount_Col"), ROUND((pub."GL_Table"."AccMnth_Col")/100,0) AS "Year", MOD(pub."GL_Table"."AccMnth_Col",100) As "Month"
    FROM pub."GL_Table"
    GROUP BY pub."GL_Table"."AccNum_Col", pub."GL_Table"."AccMnth_Col"
    ORDER BY pub."GL_Table"."AccNum_Col", pub."GL_Table"."AccMnth_Col"
    )
    WHERE "Year" = 2017


    Can anyone assist me?

    Thanks in advance

    Continue reading...
     
  2.  
Thread Status:
Not open for further replies.

Share This Page