Viewing 15 posts - 1,051 through 1,065 (of 6,037 total)
"10 tables, 3000 rows" is not the scale which could possibly justify choice of such an expensive (in all meanings) tool as SQL Server.
It's not even enough for Access.
An Excel...
_____________
Code for TallyGenerator
November 24, 2016 at 7:49 pm
There is no way to tell the exact number, but a rough estimation would be 3 times the size of the table, including all the indexes.
In case of 52GB table,...
_____________
Code for TallyGenerator
November 24, 2016 at 7:41 pm
chrisfradenburg (11/22/2016)
_____________
Code for TallyGenerator
November 23, 2016 at 9:09 pm
Ed Wagner (11/22/2016)
Sergiy (11/22/2016)
RonKyle (11/22/2016)
Use a natural key in OLTP designs when possible.
What is you natural key for "person" records?
There isn't one. Anything about a person...
_____________
Code for TallyGenerator
November 23, 2016 at 5:22 am
RonKyle (11/22/2016)
Use a natural key in OLTP designs when possible.
What is you natural key for "person" records?
_____________
Code for TallyGenerator
November 22, 2016 at 6:12 pm
The logic for UPDATE action is not so clear to me.
What outcome is expected after updates?
Does "last record" mean "last changed"?
_____________
Code for TallyGenerator
November 22, 2016 at 4:32 am
I guess this trigger would do what you want to do:
CREATE TRIGGER dbo.trg_MakeLatestRecordActive ON dbo.Records
FOR INSERT, UPDATE
AS
UPDATE R
SET Active = CASE WHEN R.RecordID = i.LastRecordID THEN 1 ELSE 0...
_____________
Code for TallyGenerator
November 21, 2016 at 10:01 pm
Why do you need this part?
BEGIN
Update X_POPDateChange set NEWDATE=inserted.REQDATE
from inserted
END
I believe it can be simply removed.
_____________
Code for TallyGenerator
November 20, 2016 at 2:15 pm
Thanks everyone for positive feedbacks.
For myself I use a simple rule of thumb here:
table is a table, even if it's a temporary one, and within transactions it acts as a...
_____________
Code for TallyGenerator
November 16, 2016 at 8:01 pm
For couple of years I had a can of tuna in my drawer.
I did not put it there, I inherited it together with the drawer from a collegue who left...
_____________
Code for TallyGenerator
November 10, 2016 at 8:58 pm
Hugo Kornelis (11/10/2016)
Sergiy (11/10/2016)
ThomasRushton (11/10/2016)
_____________
Code for TallyGenerator
November 10, 2016 at 4:57 pm
ThomasRushton (11/10/2016)
_____________
Code for TallyGenerator
November 10, 2016 at 2:36 pm
Jeff Moden (11/6/2016)
Luis Cazares (11/2/2016)
That said,...
_____________
Code for TallyGenerator
November 9, 2016 at 7:39 pm
Let's create a test table:
SELECT CONVERT(DATETIME, tg.N ) DT, CONVERT(DATETIME2, DATEADD(dd, N, '19000101')) DT2
INTO #Dates
FROM dbo.TallyGenerator(0,1000000, NULL, 1) tg
CREATE INDEX IX_DT ON #Dates(DT)
CREATE INDEX IX_DT2 ON #Dates(DT2)
Now run the performance...
_____________
Code for TallyGenerator
November 9, 2016 at 4:15 pm
SELECT CONVERT(DATETIME, 42335)
So convenient.
Especially when you need to generate a range of dates from a Tally table.
SELECT CONVERT(DATETIME2, 735930)
Ooops...
SELECT GETDATE() - 1
Easy.
SELECT SYSDATETIME() - 1
Ooops...
Well, if you love...
_____________
Code for TallyGenerator
November 9, 2016 at 4:01 pm
Viewing 15 posts - 1,051 through 1,065 (of 6,037 total)