4 Apr '12

Shiva Prasad

A collection of source codes that I wrote in VB 6.0, ASP.NET, PHP, C#.NET, VB.NET and JAVA in a course of my career as web developer and software engineer that I would like to share to my fellow programmers. Some of the codes here is not my original work that I found over the Internet and Books while I'm learning how to program. I hope you find my work useful in your learning in programming. Please share my work to other people also who interested to learn the basics of web development and programming. Thank you very much and Happy Productive Programming Everyone.

0 Shares

Retrieve Daily, Weekly, Monthly Record from SQL Server

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

Related Posts