SELECT * FROM dbo.tblCourse where convert(varchar(12), [ExpireDate],102)=convert(varchar(12), getdate(),102)
//Example 2
SELECT UserId,Email,firstName,tblCourse.CourseTitle FROM tblUsers INNER JOIN tblCourse
ON tblUsers.UserId = tblCourse.CreatedBy
WHERE UserId IN (SELECT DISTINCT CreatedBy
FROM dbo.tblCourse)
AND convert(varchar(12), [ExpireDate],102)=convert(varchar(12), getdate(),102)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment