Viewing 15 posts - 1,636 through 1,650 (of 2,452 total)
care to share your table scripts / indexes / sample data scripts that demonstrates your issue?
May 19, 2013 at 9:46 am
you seem to be making several postings to very old threads......????
May 19, 2013 at 9:21 am
Jeff Moden (5/18/2013)
The key is to not put columns into functions so that indexes can actually use them as part of a seek.
Hi Jeff...appreciate you comment.
however been playing around...always dangerous...
May 19, 2013 at 8:01 am
ok..try this...far from elegant, and performance may be poor dependent upon number of rows and indexes
hopefully some else will chime in with a better idea.....
SELECT DISTINCT ClientId
FROM...
May 18, 2013 at 9:35 am
New Person (5/18/2013)
I am very sorry. You are right . Client Id 1 qualifies all the criteria.
so can I assume ClientId 3 qualifies as well?
SELECT ClientId, ActivityId, CreateDate,...
May 18, 2013 at 9:21 am
why doesn't ClientId "1" qualify?
SELECT ClientId, ActivityId, CreateDate, DATEDIFF(d, CreateDate, GETDATE()) AS datediff
FROM TestPurgeClient
WHERE (ClientId = 1)
May 18, 2013 at 9:10 am
can we start again with a bigger data set that demonstrates all your possibilities and the expected outcome.
sorry...but i'm obviously not thinking clearly 😛
May 18, 2013 at 7:35 am
New Person (5/18/2013)
May 18, 2013 at 6:43 am
normally formatting is better left to the front end app to perform.
sometimes however this isn't always poss or desired.....
so in this case, how does your client want the following displayed?
-10,000,000
1
10
100
1,000
10,000
100,000
1,000,000
May 18, 2013 at 2:41 am
as a start...try this
SELECT ClientId
FROM TestPurgeClient
GROUP BY ClientId
HAVING (SUM(CASE WHEN DATEDIFF(d, CreateDate, GETDATE()) > 90 THEN 1 ELSE 0 END) =...
May 18, 2013 at 2:32 am
AndrewSQLDBA (5/14/2013)
I have the SSMS Tools. So how would...
May 14, 2013 at 1:12 pm
http://www.ssmstoolspack.com/Licensing
take a look above...still free for 2008.
don't think that SSMS will do what you want...but be very pleased to be proved wrong .
May 14, 2013 at 12:58 pm
as a guide
SELECT COUNT(employee) AS All_cnt,
sum(case when hiredate = '1995' then 1 else 0 end) as HY_1995 ,
sum(case when hiredate = '1996' then 1 else 0 end)...
May 14, 2013 at 12:36 pm
Matthew Cushing (5/13/2013)
J Livingston SQL (5/13/2013)
personally I would model this in excel and pivot tables first.....easy enough to create sample data.
start planning on what you really want to analyse /...
May 13, 2013 at 2:08 pm
Viewing 15 posts - 1,636 through 1,650 (of 2,452 total)