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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

selecting dates that are in a specific year

Status
Not open for further replies.

andycape

Programmer
Aug 22, 2003
177
ZA
i'm having problems with the following statement, i want to select all records from a table where the region and the year are specified :

SELECT * FROM ExpenseAnalysis left join Stores on Stores.StoreID = ExpenseAnalysis.StoreID where region = 'regionname' and year(Dateselected) = 2003 order by Store"

the problem seems to be the way i'm selecting the year?

thanx.
 
hi andycap
I think u have to use Convert(datetime,selecteddate) function for manipulation , i think this works.
Enjoy programming
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top