Hello,I can see that you have a lot of knowledge in this forum, that's why I registered to get some help with this problem.I'm trying to modify this code:SQL7 = " FROM XXX_XX A, XX_XXBA B" & _ " WHERE A.LINENOM_NO=B.LINENOM_NO" & _ " AND GRADE='" & STATU & "'" & _ " AND TO_CHAR(B.UPDATE_DATE-7/24,'YYYYMMDD') BETWEEN '" & From_date & "' AND '" & To_date & "'" & _ " ORDER BY A.CUSTOMER"
By adding an OR to the code as follows:SQL7 = " FROM XXX_XX A, XX_XXBA B" & _ " WHERE A.LINENOM_NO=B.LINENOM_NO" & _ " AND GRADE='" & STATU & "'" & _ " OR GRADE='" & STATD & "'" & _ " AND TO_CHAR(B.UPDATE_DATE-7/24,'YYYYMMDD') BETWEEN '" & From_date & "' AND '" & To_date & "'" & _ " ORDER BY A.CUSTOMER"
I'm trying to obtain the list of the products where the "GRADE" is STATU or STATDBut when I run the code it gives me this results but witout consider the Date Period.Please, help me with the proper syntax.It's difficult for me to write in english, but, thank you for your help.