Viewing 10 posts - 16 through 25 (of 25 total)
Here is the only solution I've come up with so far, and it's not dynamic. Below partners are actually locations
SELECT
SUM(CASE WHEN p1 > 0 AND p2 = 0 AND...
April 4, 2012 at 2:04 pm
Ok, what I'd like the results to look like is something like this:
I tried to get the outputs calculated manually not 100% sure I'm right...
For multiple locations, I'm trying to...
April 4, 2012 at 11:00 am
Ok, let me try to follow that post...
Query to create a temp table:
-----------
CREATE TABLE [dbo].[mytemptable](
[id] [int] IDENTITY(1,1) NOT NULL,
[customer_id] [int] NOT NULL,
[location_id] [int] NOT NULL,
[date_entered] [datetime] NOT NULL,
CONSTRAINT [PK_mytemptable]...
April 4, 2012 at 9:33 am
Humm, I wish I could do it in 3 queries. So far I have 8 unique ones and then 4 more that are repeated in loops. The outputs...
April 3, 2012 at 2:33 pm
Thanks for the reply, the actual database table structure is much more complex than what I need as an example.
Let's say there are 4 tables
Partners:
-ID
-Name
Locations:
-ID
-Name
-Partner_id (FK)
Customers:
-ID
-Name
LocationScans:
-Location_ID (FK)
-Customer_ID (FK)
-date_entered
Here is a...
April 2, 2012 at 1:47 pm
Actually instead of Row_Number, doing this totally worked:
SELECT COUNT(rank_fairways) OVER (PARTITION BY rank_fairways) fairway_ties, * FROM (
June 22, 2010 at 1:00 pm
Hello,
Thanks for the suggestion, that's a very neat trick, however the result is not exactly what I was looking for.
So let's say there are 3 people tied for 4th...
June 22, 2010 at 12:56 pm
Ok, looks like my initial assessment of the slow down was wrong. We went back to 2005, created a new event, ran a simulation and it's also slow. ...
June 15, 2010 at 11:15 am
Ok, here are the execution plans. They are pretty big. And do look different.
June 14, 2010 at 11:42 am
Hi, thanks for a quick reply. How do I gather fresh performance statistics on SS2K8.
Also, How do I get and share the exec plans from SS2K5 or the old...
June 14, 2010 at 11:16 am
Viewing 10 posts - 16 through 25 (of 25 total)