Compare two dates

Posts   
 
    
e106199
User
Posts: 175
Joined: 09-Sep-2006
# Posted on: 06-Dec-2012 22:26:59   

edit: nevermind, i found my answer. IExpression is what i needed.

Hi, I am trying to compare two date fields in two different tables by adding 7 days to the first field. I can write the sql but not sure how to write the llblgen code for it. Any ideas?

here is the sql i want to generate:

SELECT sfgbc.StudentID
  FROM GradeBook.StudentFinalGradeByClass sfgbc
INNER JOIN Core.StudentHistory sh ON sh.StudentID = sfgbc.StudentID AND sh.AcademicTermID = sfgbc.AcademicTermId
INNER JOIN Core.AcademicTerm at ON at.AcademicTermID = sh.AcademicTermID
WHERE at.AcademicYearID=2013 AND DATEADD(DAY, 7, sfgbc.SubmitDate) >= at.DateAcademicTermEnds