Viewing 15 posts - 42,451 through 42,465 (of 59,102 total)
No need for rounding if you're going to cast the answer...
SELECT CAST(100.0/ABS(VALUE) AS DECIMAL(9,3))
For example...
SELECT CAST(100.0/ABS(6) AS DECIMAL(9,3))
--Jeff Moden
Change is inevitable... Change for the better is not.
August 9, 2009 at 8:49 am
Heh... Like I said, it's best to mostly forget about loops. 🙂 If you're not actually using SQL Server 2005 and you have SQL Server 2000, there's still a...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 9, 2009 at 8:09 am
It would have really been handy if you did like I said and read the article at the first link in my signature below so that you would have provided...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 9, 2009 at 7:19 am
shannonjk (8/8/2009)
I have a batch of code that updates a record sequence based on...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 8, 2009 at 10:50 pm
shannonjk (8/7/2009)
Ah sweet thank mr or mrs 500 😀I completely forgot about cross joins!
Heh... it would be better if you forgot how to make While Loops. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
August 8, 2009 at 2:57 pm
Divide'n'Conquer... it seems like you're trying to do everything in a single query and that can really make a mess of things. Write a proc that will get the...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 8, 2009 at 2:54 pm
Ummmm... be careful... aggregated views (views with things like SUM) in them, aren't necessarily going to be faster if you use a criteria against their result set. For example,...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 8, 2009 at 1:51 pm
Ok... just to set your mind at ease, here's what I see 1 year's worth of storage taking for the data as a worst case rough ESTIMATE...
SchemeCode ...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 8, 2009 at 1:38 pm
Heh... I really do have to install the DevEd of 2k8. Thanks for the reminder.
--Jeff Moden
Change is inevitable... Change for the better is not.
August 8, 2009 at 1:08 pm
saivko (8/8/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
August 8, 2009 at 1:03 pm
smknox (8/7/2009)
thanks so much. This works.Sam
You bet and my pleasure. I am confused a bit, though... why do you need to do this? It's not often I see...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 7, 2009 at 8:51 pm
ta.bu.shi.da.yu (8/7/2009)
Hey Jeff... I don't suppose you know how to wrap a CTE in a view? 🙂
Sure... it's easy... you've just gotta follow one of the main rules. Every...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 7, 2009 at 8:28 pm
The following formula will do it... convert to handle columns from a table instead of variables for a set based solution... this is just for demo...
--I would like to add...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 7, 2009 at 8:16 pm
Mad-Dog (8/6/2009)
my goal here is to capture all the queries that run now that cause the CPU to become over 90%.
my CPU get to 90-100 a lot of time.
so i...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 7, 2009 at 8:05 pm
ps (8/6/2009)
I've always been confused abt this part of the overall equation. How exactly adding 2 to the number of rows helps in finding...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 7, 2009 at 7:59 pm
Viewing 15 posts - 42,451 through 42,465 (of 59,102 total)