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

Status
Not open for further replies.
M

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...
 
Status
Not open for further replies.
Top