Viewing 15 posts - 17,671 through 17,685 (of 59,069 total)
Hey! As a bit of a sidebar, something like this would make a great "SQL SPACKLE" article. You should take up the pen and submit an article.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 11, 2016 at 8:38 pm
Very cool, John. That's awesome. Thanks for posting what you tried and done. Really appreciate it.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 11, 2016 at 8:37 pm
I'll be there. We normally head over to shields afterwards. They've got a decent bit o' beer on tap, good food, and it's just a hop-skip-and-jump away.
Shifting gears,...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 11, 2016 at 3:00 pm
wojciech.muszynski (5/11/2016)
Jeff Moden (5/10/2016)
Heh... absolutely correct. It doesn't happen often but it does happen.
Scientists have calculated that the chance of anything so patently absurd actually existing are...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 11, 2016 at 4:57 am
Looks like those may work. Have you tried them, yet?
--Jeff Moden
Change is inevitable... Change for the better is not.
May 10, 2016 at 11:58 pm
Grumpy DBA (5/10/2016)
jasona.work (5/10/2016)
Dang, now I want sliders for lunch...
6 sliders, order of fries, order of deep-fried mozzarella sticks, large Coke...
Not sure where in the dirty mitten you reside but...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 10, 2016 at 9:33 pm
Lynn Pettis (5/10/2016)
Why are people still using SQL-89 style joins?
Heh... because you can't do anything else in a correlated sub-query including WHERE EXISTS? Because they're a real nice shortcut...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 10, 2016 at 9:26 pm
kiwood (5/10/2016)
--Jeff Moden
Change is inevitable... Change for the better is not.
May 10, 2016 at 9:20 pm
If you want INTEGER values that are guaranteed not to run into a bitter end, then you might do something like the following because NEWID() is guaranteed to never have...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 10, 2016 at 6:54 am
wojciech.muszynski (5/9/2016)
SELECT *FROM Person.StateProvince
WHERE (ABS(CAST((BINARY_CHECKSUM(*) * RAND()) AS INT)) % 100) < 10
What happens if CAST((BINARY_CHECKSUM(*) * RAND()) AS INT = - 2^31 ?
Int Range is <-2 147...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 10, 2016 at 5:15 am
@david-2 Poole,
Awesome job on demonstrating the RAND() function of SQL Server and the "binning" and not so random nature of sequential seeds. Thanks for taking the time to put...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2016 at 7:29 pm
For those interested in the generation of non uniform random numbers (again and still pseudo random), the late, great Dwain Camps wrote a very nice article on the subject at...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2016 at 7:27 pm
Andrew Morgan (5/9/2016)
However beware, when used in a select, it is only evaluated once, egSELECT RAND(),*
FROM sys.objects
GO
will output the SAME value.
That and a workaround substantial enough for the generation of...
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2016 at 6:33 pm
robert.bruhin (5/9/2016)
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2016 at 6:14 pm
tarr94 (5/6/2016)
--Jeff Moden
Change is inevitable... Change for the better is not.
May 9, 2016 at 4:50 pm
Viewing 15 posts - 17,671 through 17,685 (of 59,069 total)