Viewing 15 posts - 51,121 through 51,135 (of 59,091 total)
Just my 2 cents... you don't need CTE's for this... don't even need derived tables... just the Cross Join...
SELECT t1.N AS Month, t2.N AS Day
FROM dbo.Tally...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 8:23 pm
I agree with Sergiy... life would be a lot easier that way... create a "Gold Set" of scripts or even an empty database to copy from.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 8:14 pm
Heh... I'm thinking "tie" and I'm thinking that, once again, only RegEx replace beats T-SQL... you sure it can't be done using some magic RegEx replace?
And, by the way, I...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 8:12 pm
SELECT CEILING(CAST (12.2 AS FLOAT))
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 8:08 pm
You do realize that your table is a bit denormalized? Can't you turn it into a true EAV (Entity, Attribute, Value) table?
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 8:03 pm
Splitting free text names is a huge pain in the patoooti... For example, two-part first names, middle initials, and a host of other formatting sins (FullName being the first sin)...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 7:49 pm
Steve, do you have a URL handy to sign up?
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 7:01 pm
Only if the tuning Wizard says so... haven't figured them well enough to do it on my own, yet... I guess it is a possibility here...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 6:57 pm
Heh... you started it... was hoping you had some final code 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 11:42 am
Ooohhh... not good. Just wait till you try a bunch of inserts that are close to each other for the cSpecialty column... it's a 4 letter word... WAIT....
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 11:40 am
Sorry, Gus... we're posting in parallel...
The -1 addition will work but I think the tweek needs to be extended to the days column, as well.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 11:33 am
GSquared (4/14/2008)
declare @D1 datetime, @D2 datetime
select @d1 = '02/Nov/06 9:14:21 AM', @d2 = '19/Apr/07 11:52:31 AM'
select datepart(year, @d2-@d1)-1900...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 11:31 am
Matt Miller (4/14/2008)
Jeff Moden (4/14/2008)
I wonder which would work more quickly? I think the CLR might win this one because it uses implicit functions...
As of right now - "straight...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 10:51 am
antonio.collins (4/14/2008)
LEAD()/LAG() give access to next/prior rows in an ordered set without needing a self join.http://www.oracle-base.com/articles/misc/LagLeadAnalyticFunctions.php
Thanks, Antonio.
Heh... "Ordered Sets" in an RDBMS... I use them a fair bit but what...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 10:44 am
Temp table???? What temp table????
--Jeff Moden
Change is inevitable... Change for the better is not.
April 14, 2008 at 10:35 am
Viewing 15 posts - 51,121 through 51,135 (of 59,091 total)