Free Student Projects

Follow

Retrieve Daily, Weekly, Monthly Record from SQL Server

by Shiva Prasad

Share

Retrieve Current Weeks Record From Database

SELECT
COUNT(*) AS rows
FROM Orders
WHERE YEARweek(ODate) = YEARweek(CURRENT_DATE);

Retrieve last week Record From Database (starting with Sunday)

Retrieve Daily, Weekly, Monthly Record from SQL Server

SELECT
COUNT(*) AS rows
FROM Orders
WHERE YEARweek(ODate) = YEARweek(CURRENT_DATE – INTERVAL 7 DAY);

Last  Retrieve last month Record From Database

SELECT
COUNT(*) AS rows
FROM Orders
WHERE
SUBSTRING(ODate FROM 1 FOR 7) =
SUBSTRING(CURRENT_DATE – INTERVAL 1 MONTH FROM 1 FOR 7);

For more project Ideas visit http://www.bestprojectsidea.com/

For Source code of all projects visit http://www.studentprojectcode.com/

POPULAR PROJECTS

POPULAR PROJECTS

Share

Related

Latest