Viewing 15 posts - 3,571 through 3,585 (of 5,502 total)
Since you're talking about a dynamic PIVOT I assume you're familiar with dynamic T-SQL syntax.
Therefore, I recommend to have a look at the DynamicCrossTab link referenced in my signature. It...
May 7, 2010 at 4:46 pm
PaulB-TheOneAndOnly (5/7/2010)
Cory Blythe (5/7/2010)
The table would be simple Zip1, Zip2, Distance.Some of the more common uses would be find all Values of Zip2 within 10 miles of Zip1 etc.
Once table...
May 7, 2010 at 3:29 pm
Oh, I need to add one more question: how accurate do you need to calculate the distance? Or, in other words: What is the largest distance you're dealing with?
May 7, 2010 at 2:31 pm
I strongly vote against that proposal!
Alternatively I would recommend to tune the on-the-fly solution.
Just because the current solution has performance issues does not imply in any way that there is...
May 7, 2010 at 2:25 pm
How does the table structure looks like (including sample data)?
What do you consider as a "sent message"?
Example: I send a mail to 10 people using a single mail and miltiple...
May 7, 2010 at 11:49 am
CirquedeSQLeil (5/6/2010)
vijay.s (5/6/2010)
No ReturnPercent its only name it have full numeric value like amount.But for client 1 your sample data is summing that column with the cumulative column.
No, it's not...
May 6, 2010 at 1:52 pm
Ok, here's a coded version based on the link Jason provided:
DECLARE
@ClientCode INT,
@cumReturn NUMERIC(18,4)
SET @ClientCode=0
SET @cumReturn=0
UPDATE #Scores
SET
@cumReturn=
CumulativeReturn=
CASE
WHEN @ClientCode=ClientCode
THEN @cumReturn * (100 + ReturnPercent)/100
ELSE CumulativeReturn
END,
@ClientCode = clientcode
FROM...
May 6, 2010 at 1:49 pm
WayneS (5/5/2010)
lmu92 (5/5/2010)
Might be agood idea to turn it into an article...
Yes, it would. Which reminds me... are you writing one based upon that post last year where you found...
May 6, 2010 at 12:13 pm
WayneS (5/5/2010)
lmu92 (5/5/2010)
May 5, 2010 at 5:46 pm
keent (5/5/2010)
May 5, 2010 at 4:30 pm
alex abenitez (5/5/2010)
The Dynamic part is for the creation of the fields. It starts out with the 1 column with the string of names (comma delimited).
Do you know how...
May 5, 2010 at 4:17 pm
One of the most interesting methods to connect to a list of files in a folder with (almost) pure SQL has been posted by Lowell here .
Once you have...
May 5, 2010 at 4:14 pm
kbnyny (5/5/2010)
select t1.ACTNUMBR_1, t1.ACTNUMBR_4, t1.ACTINDX, t1.CREATDDT
from C1.dbo.AN00100 t1 union all
select t2.ACTNUMBR_1, t2.ACTNUMBR_4, t2.ACTINDX, t2.CREATDDT
from C2.dbo.AN00100 t2 union all
select t3.ACTNUMBR_1, t3.ACTNUMBR_4, t3.ACTINDX, t3.CREATDDT
from C3.dbo.AN00100 t3
WHERE...
May 5, 2010 at 3:57 pm
When you do your testing, try the following:
before running your query, add
SET DATEFIRST 1 -- set the first day of a week = Monday
The result of your query might be...
May 5, 2010 at 3:52 pm
Viewing 15 posts - 3,571 through 3,585 (of 5,502 total)