Viewing 15 posts - 721 through 735 (of 1,082 total)
WOuld this be what you want?
SELECT
[empno],
SUM(DATEDIFF(Month,[startdate],[enddate])) as tot
FROM test
GROUP BY [empno]
August 26, 2008 at 8:07 am
Hi again.
Could you give us an example of what the ouput should be?
Thanks
Chris
August 26, 2008 at 7:35 am
HI there,
Is this what you looking for?
SELECT
s.[empno] ,
DATEDIFF(minute,s.[startdate],e.[enddate])
,[startdate]
,[enddate]
FROM (SELECT MAX(Enddate) as Enddate, [empno] FROM test GROUP BY [empno]) e
INNER JOIN (SELECT MIN(Startdate) as Startdate , [empno] FROM test GROUP...
August 26, 2008 at 6:55 am
Glad to be of help 🙂
August 11, 2008 at 7:41 am
I'm not 100% sure on this, but I have seen a few people with problems similar to this.
A lot of the time it is down to something called "Parameter sniffing"...
August 11, 2008 at 7:22 am
Strangest question I ever saw.
Why do you even need teh table?
DECLARE @Loop INT, @Number INT
DECLARE @Loop2 INT
SET @Loop = 0
SET @Loop2 = 3
WHILE @Loop <= 7
BEGIN
...
August 11, 2008 at 5:18 am
Cool thanks
They all have Avg page of 1
So these I don't have to worry about then is that right 🙂
I must say thats you all, I have learn' more today...
August 8, 2008 at 8:44 am
The table only has 163 rows or so.
How would I tell how many pages it's using?
just want to say thanks again for all the help 🙂
August 8, 2008 at 8:26 am
HI All,
I just ran an index rebuild on a table and it still has a fragmentation of over 90%????
Anyone know why this is?
Thanks
Chris
August 8, 2008 at 8:20 am
THis pretty exciting stuff 🙂
Thanks for all the help everyone.
Whats cause index fragmentation?
August 8, 2008 at 7:29 am
Last question he he he
Does anyone have any good procedures for searching an entired DB for Index Fragmentation?
August 8, 2008 at 6:56 am
Thanks for the reply...
Looks like I might spend my afternoon rebuilding half the indexes on the server 🙁
as most are 66.66%
Also is this just simply a matter of manually droping...
August 8, 2008 at 6:49 am
Thanks Jack that is great help.
I'm going start reading up about indexes fragmentation now 😉
August 8, 2008 at 6:47 am
Grant,
Do you have any tips/advice on scripts that you mentioned above, that check indexes and fragmentation etc?
and how often you do this kind of thing on your system.
I'm just worried...
August 8, 2008 at 6:42 am
HI All,
I'm new to statistics and all that, but finding it interesting 🙂
Yesterday on our production system we had a query that ran like a dog however if I put...
August 8, 2008 at 6:33 am
Viewing 15 posts - 721 through 735 (of 1,082 total)