Select record greater than or equal to Todays Date in SQL Server

Last Reply 2 months ago By pandeyism

Posted 2 months ago

I am trying to get records having profile match as well as having last date of apply is greater than or equal to current date but it is only showing record having last date of apply greater than current date .

            string query = "SELECT Id,Job_title,Company_name,Salary,Location,City,Qualification,Age FROM Post_job_details WHERE Qualification IN (select Qualification from Job_Seeker_Profile) OR Age In (Select JS_age from Job_Seeker_Profile) and CONVERT(DATE,Last_Apply_date)>CONVERT(Date,GETDATE()) or CONVERT(DATE,Last_Apply_date)=CONVERT(Date,GETDATE())  and email='" + Session["mail"].ToString() + "'";

 

Posted 2 months ago

Hi itsme,

Try below sample query.

SQL

SELECT Id,Job_title,Company_name,Salary,Location,City,Qualification,Age 
FROM Post_job_details 
WHERE Qualification IN (select Qualification from Job_Seeker_Profile) 
OR Age In (Select JS_age from Job_Seeker_Profile) 
and CONVERT(DATE,Last_Apply_date)>=CONVERT(Date,GETDATE())