Viewing 15 posts - 43,501 through 43,515 (of 59,102 total)
drogers (6/10/2009)
Uh, why would you "not agree with the idea that RAND() doesn't work like NEWID() in T-SQL." Do you find the discrepancy "unexpected?" 😀
Heh... Only the first time...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 10, 2009 at 11:09 am
RBarryYoung (6/9/2009)
Jeff Moden (6/9/2009)
O(wtf2) 😉Heh. Hey, I'm not the one who asked the question, I'm just trying to answer them.
Oh no... sorry, Barry. Wasn't directed at anyone in...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 10, 2009 at 5:52 am
Mike C (6/9/2009)
Jeff Moden (6/9/2009)
Mike C (6/9/2009)
Another minor quibble - each instance of RAND() is invoked once per query.
SELECT RAND(), RAND()
Generates two different random numbers because RAND() is actually called...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 9, 2009 at 10:45 pm
Steve Jones - Editor (6/9/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 9, 2009 at 10:40 pm
balars_2000 (6/9/2009)
I would display 0's to indicate there was no data during that particular week.--Ta
Then you need a complete list of dates to join against for any given year...
[font="Courier New"]DECLARE @FirstDate DATETIME
SELECT @FirstDate = '20090104'
SELECT v.Number AS Week,
DATEADD(wk, v.Number ,@FirstDate) AS StartDate,
DATEADD(wk, v.Number+1 ,@FirstDate) AS NextDate
FROM Master.dbo.spt_Values v
WHERE Type = 'P'
AND Number BETWEEN 0 AND 51[/font]
--Jeff Moden
Change is inevitable... Change for the better is not.
June 9, 2009 at 10:34 pm
Heh... no, I had the right post.
No one has correctly defined what the "first ten" will be. Without something to do an ORDER BY in the data, all...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 9, 2009 at 9:20 pm
Sorry... wrong post.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 9, 2009 at 9:15 pm
Jason Crider (6/9/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 9, 2009 at 9:08 pm
Obviously not directed at Steve... this type of thing is a big steaming pile of hooie. Everyone thinks they can figure out humans with numbers and stats. Try...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 9, 2009 at 9:00 pm
balars_2000 (6/9/2009)
thanks for ur response; appreciate it.
sorry if i wasnt clear, i need week numbers and week start dates for any given date range or a year. if it...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 9, 2009 at 8:56 pm
O(wtf2) 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
June 9, 2009 at 7:26 pm
With that thought in mind, even the BIT datatype is tri-state... Yes, No, an dunno (NULL)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 9, 2009 at 7:20 pm
hugh.mileshkin (6/9/2009)
Thanks so much for your help Jeff & John, really appreciate it! 🙂
Thanks, Hugh. Good feedback like that is the only pay we get for this type of...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 9, 2009 at 7:17 pm
GilaMonster (6/9/2009)
He turned it down, because his current company had offered him a raise if he would stay.
Yowch! I have some pretty strong feelings about that. I...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 9, 2009 at 7:12 pm
jcrawf02 (6/9/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 9, 2009 at 7:09 pm
Viewing 15 posts - 43,501 through 43,515 (of 59,102 total)