Viewing 12 posts - 31 through 42 (of 42 total)
Since this is the 2008 forum, I would guess you would be okay running this:EXEC sp_dbcmptlevel 'DatabaseName', 100
... but you should run that by any DBAs you may have available.
June 5, 2012 at 10:00 am
I don't know if this is really what you're looking for, but I took a stab for fun.
First, I loaded up some test data...
CREATE TABLE #Orders
(
OrderID INT IDENTITY(1,1),
...
June 5, 2012 at 9:36 am
Artoo22 (6/5/2012)
Luis Cazares (6/5/2012)
If your columns behave as bit columns instead of behaving as int, there's no need for the case, you can simply add the columns.you cannot add bits
Sure...
June 5, 2012 at 8:34 am
dwain.c (6/1/2012)
jeffem (6/1/2012)
Just a note about the performance: I did a comparison, and using a table variable will give a bit...
June 4, 2012 at 1:11 pm
Jeff-
This really confused me for a while, until I made an assumption that you meant "can't". Assumption correct? If not, could you help me understand how you mean it?
June 4, 2012 at 11:39 am
It doesn't hurt to do it with a left join, but if you use an inner join there, you don't need to require where t2.id is not null.
June 1, 2012 at 11:20 am
Dwain, good job on accounting for the missing IDs! ๐
Just a note about the performance: I did a comparison, and using a table variable will give a bit of a...
June 1, 2012 at 7:38 am
A good point! It seems to me the best way to handle it might be to create a ROW_NUMBER(), to have perfectly sequential IDs, then use the solutions presented before....
May 31, 2012 at 9:25 pm
If you want something simpler than ColdCoffee's solution, but not nearly as efficient (according to the estimated execution plan, unless you index the join and include the return values), using...
May 31, 2012 at 10:22 am
Seรฑor Magoo,
That is some terrific info and very easy to digest! I greatly appreciate the time you spent on that. It helps me understand CTE's a bit better, and now...
September 30, 2011 at 11:48 am
Really, both are important, in a sense. I already HAVE the results in the form I wanted (and not by just deleting results rows); I ended up creating a temp...
September 29, 2011 at 12:16 pm
OK, I just figured out to add
WHERE RowNum = 1
in the anchor portion of the recursive CTE, but I'm still not quite there.
September 29, 2011 at 11:57 am
Viewing 12 posts - 31 through 42 (of 42 total)