Viewing 9 posts - 1 through 9 (of 9 total)
You are on the right track. Here is general idea of the solution I implemented.
This was provided by Erland Sommarskog and I'll just quote his answer:
" declare...
November 14, 2002 at 1:33 pm
The above should create these tables:
Dc1
cc1c2
11/0113
11/0214
11/0312
11/0415
11/0122
11/0226
11/0324
11/0425
Dc2
cc1c2
11/01123
11/02124
11/03122
11/04125
11/0142
11/0246
11/0344
11/0445
11/0162
11/0266
11/0364
11/0465
The select statement produces 10.
You see how I'm subtracting off the second result from Dc2 because it
is joined twice with the values in Dc. ...
November 12, 2002 at 7:23 am
This is the second table and select statement:
CREATE TABLE dbo.Dc2(c datetime, c1 int, c2 int)
INSERT
INTO dbo.Dc2 (c, c1, c2)
VALUES ('11 / 01 / 02',...
November 12, 2002 at 7:21 am
I've simplified the issue down to a couple of tables:
CREATE TABLE dbo.Dc(c datetime, c1 int, c2 int)
INSERT
INTO dbo.Dc (c, c1, c2)
VALUES ('11 / 01...
November 12, 2002 at 7:20 am
Well, I figured out one way to do it. Divide the second return by two, sum it and subtract from the total.
I can't help but think there's...
November 8, 2002 at 12:55 pm
Using the statement in this way still results in the cartesian problem. I added statments to sum the ecp and msc numbers for troubleshooting and with this statement the...
November 8, 2002 at 10:00 am
Yes, thanks, that basically works.
One problem though:
Using
SELECT DISTINCT dn.[Date] AS Date, SUM(dn.MOUs) + SUM(dl.MOUs) AS MOUs, (100 * (SUM(dn.TotBlks) + SUM(dl.TotBlks))) / (SUM dn.TotalAtt) + SUM(dl.TotalAtt))...
November 7, 2002 at 12:13 pm
Okay, I figured out the problem. In DTS there is a checkbox that say "enable identity insert." It must be unchecked which seems counterintuitive because identity insert (autopopulation)...
October 18, 2002 at 12:13 pm
Yes, thanks. DTS is generating an error when data is loaded. I'm loading from an excel spreadsheet and the error is: "Cannot insert the value NULL into the...
October 17, 2002 at 12:24 pm
Viewing 9 posts - 1 through 9 (of 9 total)