Viewing 15 posts - 24,061 through 24,075 (of 59,102 total)
Heh... I'll second the "It Depends" aspect.
What Recovery Model is the database in?
What kind of index are you trying to build?
How many rows are you inserting in the initial batch...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 26, 2014 at 4:48 pm
I have to ask again, why are you going through all of this? What advantage do you think you're getting out of all this?
--Jeff Moden
Change is inevitable... Change for the better is not.
March 26, 2014 at 4:27 pm
Using Jason's setup code for this problem, here's a way to simplify the code a bit...
SELECT CAST(DATEDIFF(hh,0,@MaxDate-@MinDate) AS VARCHAR(10))
+RIGHT(CONVERT(CHAR(8),@MaxDate-@MinDate,108),6);
--Jeff Moden
Change is inevitable... Change for the better is not.
March 26, 2014 at 4:23 pm
miles_lesperance (3/26/2014)
case when ISNUMERIC(SRESULT) = 1 then
CASE WHEN CONVERT(int, SRESULT) between 0 and 500 THEN '2' --Green
ELSE '0'
END
It is...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 26, 2014 at 3:57 pm
DVSQL (3/26/2014)
I am trying to split up a large database file into several smaller database files at work.
WHY? What advantage do you believe that will bring you?
Unless you can...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 26, 2014 at 3:40 pm
Ed Wagner (3/26/2014)
Cursors in SQL Server are pathetically slow, but in Oracle they're blazing fast.
I guess I wouldn't say such a thing... I worked in Oracle for about 3...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 26, 2014 at 3:09 pm
adonetok (3/26/2014)
Some users uploaded Access tables to SQL are always NVARCHAR type.I found that nvarchar cause performace problem. Is it true?
I don't know why anyone that knew anything about table...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 26, 2014 at 8:58 am
It also means that unless the OrderID column is NVARCHAR, the code isn't SARGable (can't do an INDEX SEEK) and will cause a table scan to do an implicit conversion...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 26, 2014 at 7:15 am
Sean Lange (3/25/2014)
Your function looks very similar to the DelimitedSplit8K with two MAJOR exceptions. You changed the delimiter...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 26, 2014 at 7:11 am
sqlserver12345 (3/25/2014)
Thanks Jeff/Eirikur .Should have updated the forum.I got what I was looking for.Thanks again.
What did you end up with finally?
--Jeff Moden
Change is inevitable... Change for the better is not.
March 25, 2014 at 5:10 pm
todd 87764 (3/25/2014)
If I make a nonunique index on the ID column...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 25, 2014 at 3:02 pm
keith.westberg (3/25/2014)
--Jeff Moden
Change is inevitable... Change for the better is not.
March 25, 2014 at 2:59 pm
n.arley.dealey (3/25/2014)
I’m not a DBA. In fact, it’s been a long time since I’ve been a developer, but learning the little aphorism above,...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 25, 2014 at 2:42 pm
I agree with Gail. Bulk operations don't fire triggers by default. There is a "Fire Triggers" option that you can use for such things. Other than TRUNCATE...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 25, 2014 at 7:21 am
Just to throw my hat into the ring, this can be done with a single scan of the table by updating the table in the cte directly. It can...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 25, 2014 at 7:02 am
Viewing 15 posts - 24,061 through 24,075 (of 59,102 total)