Viewing 15 posts - 3,361 through 3,375 (of 4,085 total)
SQL Kiwi (1/12/2012)
drew.allen (1/12/2012)
...the OP doesn't have ANY code in place and is looking for the best solution...
The thread starter was not Bob Cullen (the chap playing around with an...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 12, 2012 at 9:23 am
SQL Kiwi (1/12/2012)
You've missed the point I was making, and have chosen to assume that I am either (a) not aware of the performance issues involved; or (b)...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 12, 2012 at 8:06 am
drew.allen (1/11/2012)
I think it's actually even simpler.
SQL Kiwi (1/11/2012)
That has a different semantic though. Example:
That's true, but this statement from the original poster sounds like the GROUP BY is...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 11, 2012 at 3:04 pm
SQL Kiwi (1/11/2012)
Greg Snidow (1/11/2012)
The 'B' shows up no matter what I put in for the length parameter of CHAR. I still don't know what it means.
So 'B' is...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 11, 2012 at 1:44 pm
I think it's actually even simpler.
SELECT StudentID, Programme, Min([Year]) AS [Year]
FROM #Students
GROUP BY StudentID, Programme
HAVING Min([Year]) = 2009
You may not even need the HAVING clause depending on what you are...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 11, 2012 at 1:33 pm
SQL Kiwi (1/11/2012)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 11, 2012 at 8:51 am
SQL Kiwi (1/11/2012)
drew.allen (1/11/2012)
Bob Cullen-434885 (1/10/2012)
I started to look at an alternative approach, using a recursive CTE to generate a continuous list of dates that covered the report range
Jeff Moden...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 11, 2012 at 7:46 am
Bob Cullen-434885 (1/10/2012)
I started to look at an alternative approach, using a recursive CTE to generate a continuous list of dates that covered the report range
Jeff Moden has an article...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 11, 2012 at 6:51 am
GSquared (1/9/2012)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 9, 2012 at 3:15 pm
halifaxdal (1/9/2012)
Table 1: has...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 9, 2012 at 2:53 pm
This is sometimes done using a trigger, but you may not have rights to create a trigger on the table being updated. Another option is to use the OUTPUT...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 9, 2012 at 1:53 pm
ChrisM@home (1/5/2012)
You've lost me Drew - I understand that the query I posted is incorrect, but how does the (theoretical) sample data I posted violate normalization?
I didn't notice that you...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 5, 2012 at 12:58 pm
CELKO (1/5/2012)
But IDENTITY is a sequential count of insertion attempts. PHYSICAL insertion attempts. Not a LOGICAL concept at all. So how do you number these rows?
You're confusing what IDENTITY is...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 5, 2012 at 12:35 pm
You can use UNPIVOT, but that gets very messy when you're trying to unpivot into more than one column. You would need three.
You can also use CROSS APPLY to...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 5, 2012 at 12:08 pm
ChrisM@home (1/5/2012)
drew.allen (1/4/2012)
ChrisM@home (1/4/2012)
say there are ten rows with the same VND_ID and only one of them matches the filter?
You'll need to post sample data illustrating the problem and the...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
January 5, 2012 at 11:51 am
Viewing 15 posts - 3,361 through 3,375 (of 4,085 total)