Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional SQL Server 2005 Administration ISBN: 0-470-05520-0
This is the forum to discuss the Wrox book Professional SQL Server 2005 Administration by Brian Knight, Ketan Patel, Wayne Snyder, Jean-Claude Armand, Ross LoForte, Brad McGehee, Steven Wort, Joe Salvatore, Haidong Ji; ISBN: 9780470055205
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional SQL Server 2005 Administration ISBN: 0-470-05520-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 15th, 2007, 03:59 AM
Registered User
Join Date: Mar 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default CH 15 - SP GetDOB is missing


I am trying to read through chapter 15 which discusses SQL 2005 indexes. I am setting up the people database for the examples and I beleive that the GetDOB stored proc is missing. I would be grateful if someone could point me at the code for this missing procedure so I can carry on with my study. Many thanks in advance

  #2 (permalink)  
Old May 1st, 2007, 09:10 AM
Wrox Author
Join Date: Dec 2006
Location: kirkland, wa, USA.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts

Hi Enrico

Thanks for buying the book, and taking the time to work thru the examples.

Here is the GetDOB SP

If you find anymore SPs are missing please let me know, and I'll try and get them posted here a bit faster next time.

USE [People]


create proc [dbo].[GetDOB] @DOB datetime output as
    -- generate DOB's
    declare @dayofYear int, @yearOffset int, @BaseYear int, @startDate varchar(12) -- , @DOB datetime

    select @BaseYear = 2006 - 110

    select @dayOfYear = rand() * 365, @yearOffset = rand() * 110
    select @startDate = '1 Jan ' + convert(varchar(4),(@BaseYear + @yearOffset))

    select @DOB = dateadd(dd,@dayOfYear,@startDate)


Steve Wort
Co Author "Professional SQL Server 2005 Administration"

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 15 - Security aspcoder BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 May 3rd, 2008 02:55 PM
CH.15 NEED HELP stacy BOOK: Beginning ASP 3.0 1 January 21st, 2004 03:37 AM

All times are GMT -4. The time now is 07:33 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.