Viewing 15 posts - 1 through 15 (of 457 total)
November 7, 2008 at 10:52 am
Read up on ISNULL() in books online, Ken pointed you in the right direction. You might try something like this:
SELECT ISNULL(test06, 0) - ISNULL(text08, 0) AS DIFF FROM mytable
July 22, 2008 at 7:48 pm
I suspect something else might be wrong as Sergiy's code should have run without issue... However you might try turning on the execution plan when you run the query...
July 22, 2008 at 7:45 pm
Loner, to me it really depends. You have to choose the backup/restore strategy which works best with your maintenance window, DR plan, db usage, etc... I manage roughly...
July 15, 2008 at 3:15 pm
Scott Coleman (1/21/2008)
A good source of WTF examples is thedailyWTF.com, and this is one of my all-time favorite T-SQL examples.
I think I just threw up in my mouth a little...
January 21, 2008 at 11:41 am
I have that shirt, you can buy it at thinkgeek.com. 😉
December 13, 2007 at 3:08 pm
GilaMonster (12/13/2007)
For info, @somestring was declared as Varchar(8000) and was built up from several fields of one row...
December 13, 2007 at 10:56 am
Oh this is great... I've seen so many good examples. The lack of brackets when you're throwing around OR statements sets my teeth on edge. The ISNULL()...
December 13, 2007 at 10:52 am
In the case that it's used by multiple applications we usually generalize the object portion a bit. It's really evaluated on an issue by issue basis.
The prefix p_ is...
December 2, 2007 at 10:07 am
I don't pre or postfix tables as a rule, however I do like to label views for the same reasons Steve said above. As for procedures I usually try...
December 1, 2007 at 3:20 pm
I frequently run into triggers others have created that don't realize that triggers need to account for set-based approaches, not just row-based approaches. When you see something like "SELECT...
November 13, 2007 at 12:01 pm
Oh totally, if I was just learning today I can guarantee you that I'd probably use EXCEPT. But I've been doing left anti-semi joins (and it rolls off the...
October 18, 2007 at 5:56 pm
I always try to think of "elegant" as being synonymous with "speedy" ;). Though when I first read about the new except/intersect syntax, I was definitely interested to find...
October 18, 2007 at 5:32 pm
EXCEPT is a newer syntax in SS2K5. The traditional method for this (and much better performing than NOT IN) is what's called a left anti-semi join like this:
SELECTa.colA
FROMTableA a
LEFT...
October 18, 2007 at 5:12 pm
Linked servers, yes. Log shipping, not so much (requires the machines to be on the same network).
Moreover, I'd highly recommend that if you're going to go this route you...
October 16, 2007 at 3:28 pm
Viewing 15 posts - 1 through 15 (of 457 total)