Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fetch Data on current date

Status
Not open for further replies.

ZABARVAN

IS-IT--Management
May 24, 2003
186
SA

How can we fetch data from tabels meeting the current date critria.

Select * from table where ord.date = ??????? ( here I need help)

Will be much appreciated.

Thanking you

Zab
 
Code:
DECLARE @Today datetime
SET @Today = DATEADD(dd,0, DATEDIFF(dd, 0, GETDATE()))

SELECT ...
...
WHERE ord.date >= @Today AND
      ord.date <  @Today+1


Borislav Borissov
VFP9 SP2, SQL Server
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top