SQL Server Nation
For all of your SQL Server needs.
Sign in
|
Join
|
Help
Home
Blogs
Downloads
Forums
SQL Wiki
Groups
Announcements
Tip of the Week
How-Tos
Administration
Development
Brandon Galderisi
Tim Chapman
April 2009 - How Tos
How Tos
Home
Syndication
RSS for Posts
Atom
RSS for Comments
Recent Posts
Create a system stored procedure
run_duration in SQL Server system tables
sp_MSForEachDB - leashed and unleashed
Determining Age through T-SQL
How to determine the Sunday of a given week!
Tags
Advanced SQL
beginner
Beginner SQL
Business Intelligence
cast
convert
date
datetime
DMV
dynamic management view
filter
function
Intermediate SQL
numbers table
parameter
parameters
return
scalar valued function
sql 2005
stored procedures
system stored procedure
table valued function
User Defined Functions
variable
view
View more
Archives
October 2009 (3)
April 2009 (2)
March 2009 (9)
Sort by:
Most Recent
|
Most Viewed
|
Most Commented
Determining Age through T-SQL
Sometimes it is necessary to calculate a person's age. I've seen people use a simple datediff on YEAR but that is not sufficient. The reason why that is not sufficient is because it ONLY evaluates a difference on the YEAR value of the date. So...
Published
22 Apr 2009 10:52 AM
by
BrandonGalderisi
Filed under:
Beginner SQL
,
User Defined Functions
How to determine the Sunday of a given week!
Sometimes it is necessary for reporting purposes to query data for a caldendar week. When doing so, us the the datepart function to retrieve the weeknum will not work because if a week spans more than one year it will only return the data for the same...
Published
6 Apr 2009 11:40 AM
by
BrandonGalderisi
Filed under:
Beginner SQL
,
scalar valued function
,
User Defined Functions
Copyright SQL Server Nation 2009