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

SQL - Current Year

Status
Not open for further replies.

Jonny1409

Technical User
Jan 15, 2006
6
GB
Hello,

I'm trying to write a function which will give me, among other things, the current year.

I'm brand new to SQL so don't really know how to use functions properly yet, although from my VB knowledge, the structure looks very similar.

I've tried SELECT GETDATE() but it gives me an error about getdate not being valid inside a function.

How can I get this to work please ?

Cheers,
J.
 
you will have a much better chance of getting this question answered in forum183, the microsoft sql server forum

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top