Viewing 15 posts - 1,531 through 1,545 (of 8,416 total)
When 2012 ships (or in the current public CTP 3) you could solve the problem without any looping:
CREATE TABLE #TranRecord
(
TransactionID INTEGER NOT NULL,
...
November 9, 2011 at 2:47 am
A normal (non-recursive) CTE is just a logical definition, like an (unindexed) view. The results from a CTE are not materialized; the optimizer considers the query as a whole...
November 9, 2011 at 2:43 am
Hugo Kornelis (11/9/2011)
November 9, 2011 at 2:39 am
Good question. The explanation could have been improved very slightly:
"SQL Server will use the same amount of storage for a column whether its value is NULL or a "real"...
November 9, 2011 at 1:26 am
seth delconte (11/4/2011)
Then add a YTD column to the base table and create insert/update/delete triggers to adjust the YTD data when values are added, updated, and deleted.
My preference would be...
November 8, 2011 at 9:30 pm
These types of issues tend to come down to mapping between Unicode and ASCII code points. That collation is a Unicode one, so it makes sense to use a...
November 8, 2011 at 8:04 pm
Jeff Moden (11/8/2011)
I say "most everything" because there are exceptions, like rCTEs, that I'll continue to classify as RBAR.
That seems inconsistent to me. I prefer something closer to Chris'...
November 8, 2011 at 7:51 pm
daveriya (11/8/2011)
i want to order my result by 1,5 ..not with column name
You just need one final ORDER BY at the bottom.
ORDER BY applies to the *result* of the whole...
November 8, 2011 at 7:15 pm
L' Eomot Inversé (11/8/2011)
November 8, 2011 at 7:10 pm
bopeavy (11/8/2011)
You can find the same Explantion right here http://msdn.microsoft.com/en-us/library/ms188055.aspx
See Hugo's reply for a detailed explanation of why your explanation is wrong. I'm not getting further involved.
November 8, 2011 at 8:08 am
goofbauer (11/8/2011)
I have a new favorite method, courtesy of Mike Powell athttp://stackoverflow.com/questions/58429/sql-set-based-range
You might like to read http://www.sqlservercentral.com/articles/T-SQL/74118/
November 8, 2011 at 8:00 am
Viewing 15 posts - 1,531 through 1,545 (of 8,416 total)