Viewing 15 posts - 6,391 through 6,405 (of 26,490 total)
Partitioning will help with the purging.
July 5, 2014 at 2:21 pm
You have double posted this question. What version of SQL Server are you using, SQL Server 2012 or SQL Server 2014?
July 5, 2014 at 2:12 pm
This is all you needed:
With cte As
(
select IntSequence, ROW_NUMBER() OVER (order by externalsequence asc) as rownumber from labels
)
update cte
set IntSequence = rownumber;
July 5, 2014 at 10:56 am
So something like this (run in an empty test database):
--Example table
create table dbo.Labels
(Id int identity (1,1),
Value varchar(20),
IntSequence bigint,
ExternalSequence bigint,
BatchId int)
-- Insert some data
Insert into dbo.Labels
(Value, IntSequence, ExternalSequence, BatchId)
Values
--batch 1
('exampleValue',...
July 5, 2014 at 10:46 am
Can you explain why you can't copy the ExternalSequence to the InternalSequence?
July 5, 2014 at 10:28 am
Eric Mamet (7/5/2014)
I started the SQL Server Browser Service and can now connect to 127.0.0.1...
I can even access my server from another machine! 😀
Could someone try to explain this...
July 5, 2014 at 10:01 am
Hard to say with what you posted but looks doable. If you post the DDL for the table, some sample data (as INSERT statements), and the expected results I...
July 5, 2014 at 9:53 am
Jeff Moden (7/4/2014)
Pulivarthi Sasidhar (7/4/2014)
We have been facing poor performance while inserting records using MERGE statment in SQL Server 2012 standard edition.
We are using dataloader of salesforce to download...
July 4, 2014 at 8:18 pm
If the data is disappearing when the server is stand alone, no mirroring, then mirroring isn't the problem.
If the data is committed and then disappears it usually means someone has...
July 4, 2014 at 12:09 pm
First suggestion, load the data to a staging table first. Then, when the data is local to database UPSERT the data to its final destination.
July 4, 2014 at 12:04 pm
pilla.sree85 (7/4/2014)
July 4, 2014 at 12:02 pm
If you are running the code in SSMS add the following after the PRINT. You can then click on the results and it will bring up the code in...
July 3, 2014 at 3:55 pm
Jeff Moden (7/3/2014)
ksrikanth77 (7/3/2014)
July 3, 2014 at 3:44 pm
J Livingston SQL (7/3/2014)
Lynn Pettis (7/3/2014)
J Livingston SQL (7/3/2014)
.I agree. With 3,250,325 rows in the main table mine ran in about 3 seconds.
what spec hardware you running Lynn.....?
Dell M4600...
July 3, 2014 at 1:20 pm
And if you are so serious about eliminating the cursor, here is some code. Try it by itself in an empty test database. I have the insert part...
July 3, 2014 at 12:29 pm
Viewing 15 posts - 6,391 through 6,405 (of 26,490 total)