Viewing 15 posts - 271 through 285 (of 683 total)
Here's the code I used (revised from the previous code to include method #4)...
--table to hold results
CREATE TABLE #Results (NumberOfTableRows INT, NumberOfRows INT, ProbabilityOfEachRow FLOAT,
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
August 24, 2007 at 9:20 am
Adrian,
I've just had a go at implementing your suggestion on my data (I really don't have time, but I can't help myself
)....
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
August 24, 2007 at 9:17 am
LOL Jeff ![]()
Actually, the results from my tests above don't show that the data is 'more random' with checksum - only that the...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
August 24, 2007 at 9:01 am
I actually needed to use this on something, so I've just spent an hour playing around with it.
Here's some testing I've...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
August 23, 2007 at 11:57 am
Using "ORDER BY CHECKSUM(NEWID())" rather than "ORDER BY NEWID()" apparently produces values with a better random distribution.
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
August 23, 2007 at 8:36 am
Thanks Jeff ![]()
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
August 16, 2007 at 12:26 am
Oh, and here are my favo(u)rite date links (so to speak)...
http://www.sql-server-performance.com/articles/dev/datetime_datatype_p1.aspx
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=64762
I hope someone finds all this stuff useful... ![]()
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
August 15, 2007 at 5:19 am
Incidentally, if you're using SQL 2005, you can jump straight to the final result fairly elegantly.
Code is safe to run...
DECLARE @MY_EVENTS TABLE (DESCRIPTION VARCHAR(50),...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
August 15, 2007 at 5:13 am
Hi all,
I'd approach it more like this, I think. The code below produces the same results and is safe to run...
DECLARE @MY_EVENTS TABLE (DESCRIPTION VARCHAR(50),...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
August 15, 2007 at 4:55 am
Very nicely-presented article - well done Jacob!
My only suggestion would be to rename this particular article to 'Simple XML Processing', as some people might be unnecessarily scared off ![]()
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
May 9, 2007 at 7:12 am
Here's another method. This one adds an identity column, uses it, and then drops it.
ALTER TABLE dbo.employee ADD...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
March 12, 2007 at 9:45 am
Here's a selection of results when I run the above code on a server here.
39 seconds to find all primes below 5...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
January 30, 2007 at 6:50 am
Hi Jeff,
Here's some code so you can run it yourself. I'll add some run results in the next post.
--Inputs
DECLARE @MaxNumber INT
SET @MaxNumber...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
January 30, 2007 at 6:40 am
Finding primes is something I worked on about 6 months ago (for fun, of course
). Here's a link to the work...
Ryan Randall Solutions are easy. Understanding the problem, now, that's the hard part.
January 29, 2007 at 3:07 am
Just because I have them handy, here are a few links to discussions on this topic...
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=64803
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=67294
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
January 24, 2007 at 10:21 am
Viewing 15 posts - 271 through 285 (of 683 total)