Viewing 15 posts - 5,356 through 5,370 (of 8,416 total)
Arjun Sivadasan (3/15/2010)
Alternately, you can use temporary table instead of CTE. Temporary tables are faster if your query returns 10k - 100k rows
Are you sure about that? 😉
March 15, 2010 at 4:56 am
RBarryYoung (3/14/2010)
Well, my back surgery is tomorrow (it got moved up).
Good news. I hope all goes well.
March 15, 2010 at 4:26 am
Just for giggles:
-- Source table
CREATE TABLE #Table1
(
row_id INTEGER...
March 15, 2010 at 4:23 am
SQL-Student (3/15/2010)
March 15, 2010 at 3:32 am
One more way:
SELECT -- Use a column list
*
FROM (
SELECT ...
March 15, 2010 at 2:28 am
RBarryYoung (3/14/2010)
WHERE ttl_av < 50?
[font="Courier New"]Msg 207, Level 16, State 1, Line 6
Invalid column name 'ttl_av'.[/font]
There are 'better' ways, but this will work:
SELECT ib.account,
...
March 15, 2010 at 1:48 am
Abhijit More (3/15/2010)
I guess I named it as an associative table between two tables. The values are correct.
In your second post, yes. That's why I asked if there was...
March 15, 2010 at 1:08 am
arr.nagaraj (3/15/2010)
I guess the original poster needed a solution using the partition clause.
You are right of course. I have updated my code sample to avoid confusion. Thank you.
March 15, 2010 at 12:35 am
Roust_m (3/14/2010)
March 15, 2010 at 12:28 am
March 15, 2010 at 12:11 am
No need for a loop.
-- Test table
CREATE TABLE #Sample
(
column1 ...
March 15, 2010 at 12:04 am
OK, all done. I had to include the RAND in the wrapper view too, for the same reason.
Here is the full script:
USE tempdb;
-- Drop the in-line function
IF ...
March 14, 2010 at 11:55 pm
Jeff Moden (3/14/2010)
But not too complicated...
There is another one inside the CROSS APPLY. Not difficult either, I am just hoping the query plan holds together.
March 14, 2010 at 11:09 pm
The article would have benefited from code examples, either in-line or in an attached file.
The only type of denormalization considered is full redundancy: storing the results of a complex join...
March 14, 2010 at 11:07 pm
Viewing 15 posts - 5,356 through 5,370 (of 8,416 total)