Viewing 15 posts - 22,321 through 22,335 (of 59,072 total)
anni00 (11/28/2014)
I'd like to get your thoughts on the approach to archiving data from a set of tables with foreign key constraints.
The scenario is we have a target table holding...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 30, 2014 at 8:35 am
GilaMonster (11/30/2014)
Jeff Moden (11/28/2014)
It would be really cool if we could get MS to retrofit this to 2012 and 2014.
Snowball's chance in hell.
They don't back-port features, can't think of...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 30, 2014 at 8:22 am
pietlinden (11/29/2014)
Sorry, can't remember if any windowing functions were available in 2008R2. Haven't used 2008 in an age (partly because windowing functions are super handy!)
Not your fault... With...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 30, 2014 at 8:19 am
itmasterw 60042 (11/29/2014)
And thanks for the alternate way of doing this, but when I compard the execution plans the cost was about the same; I was looking for a more...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 29, 2014 at 10:34 am
BTW, although this is kind of a "set based" recursive CTE (rCTE from here on) because it processes a whole level in the hierarchy at a time, rCTEs can be...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 29, 2014 at 8:54 am
peterausger (11/29/2014)
Dear all
Following is my db table
student_id student_code student_parent_id student_name
1 11 NULL a
2 111 1 b
3 1111 2 c
4 11111 3 d
I want to generate following op
student_id ...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 29, 2014 at 8:37 am
A 1 TB 15k-RPM drive costs less than $300 for a SAN drive. For a local drive, you can get one for about $70. You've probably already spent...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 28, 2014 at 8:57 pm
Take a look at the first link under "Helpful Links" in my signature line below. For this one, we're going to need to know the actual table structure is...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 28, 2014 at 7:48 pm
It won't be slow if you avoid the self join of the CTE, which causes it to go through both tables twice. This will work almost as fast as...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 28, 2014 at 7:38 pm
stook (11/28/2014)
declare @dbname nvarchar(255)='', @found bit=1
while @found=1 begin
set @found=0
select top 1...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 28, 2014 at 5:35 pm
P.S. Personally, I don't care if ANSI, ISO, INCITS, or any other organization agrees or not. Sometimes you have to first build the tool before you try to...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 28, 2014 at 5:32 pm
CELKO (11/28/2014)
--Jeff Moden
Change is inevitable... Change for the better is not.
November 28, 2014 at 5:25 pm
You might also want to look into Trace Flags 1117 and 1118.
http://www.brentozar.com/archive/2014/06/trace-flags-1117-1118-tempdb-configuration/
http://www.sqlskills.com/blogs/paul/misconceptions-around-tf-1118/
--Jeff Moden
Change is inevitable... Change for the better is not.
November 28, 2014 at 1:01 pm
TomThomson (11/28/2014)
Divine Flame (11/26/2014)
Voted. 153 now.Now 167.
Needs quite a few more vote, I think.
Agreed. I'll try to submit an "editorial" for inclusion on the front page for sometime next...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 28, 2014 at 12:35 pm
TomThomson (11/28/2014)
voted.It's now 167. Not growing fast enough.
Agreed. I'll write up an "editorial" and see if we can get it published next week.
Keep up the great work folks....
--Jeff Moden
Change is inevitable... Change for the better is not.
November 28, 2014 at 11:57 am
Viewing 15 posts - 22,321 through 22,335 (of 59,072 total)