Viewing 15 posts - 46,996 through 47,010 (of 59,095 total)
Yep... try getting the TOP 10 random rows from a big table that way... hell to pay for performance. Be careful how you use it for that reason.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 26, 2008 at 10:17 pm
Here's a "fix" for your code... doesn't change a thing in the code... just the way the "seed" for the RAND function works...
select dbo.fx_getrandomnumber(500, 300, rand(CHECKSUM(NEWID())))
FROM dbo.Tally
WHERE N <= 10
That...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 26, 2008 at 10:09 pm
Ummm... good idea and nice try... but doesn't work to create different random numbers within the same Select. For example, using the eample Select you have with your...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 26, 2008 at 10:00 pm
http://www.sqlservercentral.com/articles/T-SQL/63681/
--Jeff Moden
Change is inevitable... Change for the better is not.
November 26, 2008 at 9:29 pm
Either that, or you're mapping doesn't actually equal what's in the file. Could be something stupid like a stray comma in some name in the file.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 26, 2008 at 9:25 pm
The data conversion is failing because there's bad data in that column somewhere in the file. You need to find out what the bad data/date is and fix it...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 26, 2008 at 9:24 pm
That would certainly help... but the OP said he can't touch the code because it's generated by and ERP. This is all vry much a moot issue.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 26, 2008 at 9:21 pm
josephptran2002 (11/26/2008)
SELECT COUNT(ClearedDate) AS 'Month',
...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 26, 2008 at 9:15 pm
When you get done with your CLR, lemme know...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 26, 2008 at 9:09 pm
Chris Morris (11/26/2008)
Chris, the link in your signature is broken. You'r missing the right hand bracket on the first instance of the URL IFCode ShortCut.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 26, 2008 at 9:06 pm
Heh... check out ths clown...
http://www.sqlservercentral.com/Forums/Topic607292-1424-2.aspx#608466
He posted a NUMS function that uses a WHILE loop, has spent most of the post justifying his crud code, and then calls folks "anal"...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 26, 2008 at 9:33 am
Very nicely done, Ken. Lot's o' work went into that one. Great job.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 25, 2008 at 11:08 pm
Jeff Moden (11/25/2008)
Server: Msg 137, Level 15, State...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 25, 2008 at 7:37 pm
Thusi... you don't have these defined in your code anywhere... what are the datatypes and starting or constant values for the following variables?
Server: Msg 137, Level 15, State 2, Line...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 25, 2008 at 7:24 pm
thusi (11/25/2008)
It actually runs pretty fast!
Heh... "How fast?" 😀 Looks interesting... lemme take a look.
By the way, just to establish the scale of this project... right now you have...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 25, 2008 at 7:11 pm
Viewing 15 posts - 46,996 through 47,010 (of 59,095 total)