Viewing 15 posts - 2,596 through 2,610 (of 3,957 total)
Here's another way using ROW_NUMBER():
;WITH Projects AS (
SELECT CLIENTID, PROJECTID
,rn=ROW_NUMBER() OVER (PARTITION BY CLIENTID, PROJECTID ORDER BY (SELECT...
October 9, 2012 at 6:53 pm
Not 100% sure Alan, but I think I get it. Two ways (if I'm right).
DECLARE @Sums TABLE
(ID INT IDENTITY, Reviewed FLOAT, [Non Reviewed] FLOAT)
INSERT INTO...
October 9, 2012 at 6:44 pm
Jason Tontz (10/9/2012)
With the appropriate permissions on both the server and workstations such as domain admins, you...
October 9, 2012 at 6:25 pm
I always find it best to learn from examples, so here for you is an example of how you'd set this up to execute as dynamic SQL:
DECLARE @sql ...
October 9, 2012 at 4:39 am
Just for fun, here's a nasty piece of work:
create table #t1(name varchar (100))
INsert into #t1
select '1234ABC123456XYZ1234567890ADS'
INsert into #t1
select 'cbv736456XYZ543534534545XLS'
;WITH ChunkIt (RowID, n, str1, str2, str3) AS (
...
October 8, 2012 at 8:38 pm
vinay.varaala (10/8/2012)
I will explain it clearly from that first table unleaded product I want to sum up based on codetype like c,h and l.
output should be in 3...
October 8, 2012 at 7:17 pm
Gabe,
This sounds exactly like the problem posted here (just recently): http://www.sqlservercentral.com/Forums/Topic1369495-391-1.aspx
You'll find that the SSC team of volunteers got into a bit of a performance contest over the best way...
October 8, 2012 at 7:11 pm
lm_hamilton (10/8/2012)
Also, thanks for the concern to make sure I am not...
October 8, 2012 at 7:06 pm
Your DDL is nearly perfect except that I prefer seeing a temp table or table variable so that I don't create actual tables in my sandbox. Setup data is...
October 8, 2012 at 7:01 pm
ChrisM@Work (10/8/2012)
Jeff Moden (10/8/2012)
dwain.c (10/7/2012)[hrJeff - I don't think this solution works with your test harness.
I did say that I needed to make a change to get it to work...
October 8, 2012 at 5:22 pm
Jeff Moden (10/8/2012)
dwain.c (10/7/2012)[hrJeff - I don't think this solution works with your test harness.
I did say that I needed to make a change to get it to work and...
October 8, 2012 at 5:21 pm
Chris - I'm gonna keep moanin' until I win one of these performance races against you.
So I'll submit this (stealing your Tally table):
;WITH Tally (n) AS (
...
October 8, 2012 at 6:07 am
ChrisM@Work (10/8/2012)
A shotgun approach like this puts shivers down my spine. You have a legacy app which...
October 8, 2012 at 4:32 am
ChrisM@Work (10/8/2012)
dwain.c (10/8/2012)
I like your:
VALUES ($)
Wonder where you got that from... 😛
I know you like them - so I put in lots.
I like Euros better, just don't have that character...
October 8, 2012 at 4:26 am
ChrisM@Work (10/8/2012)
dwain.c (10/8/2012)
Nagaram's is the fastest so far - it's a good 20% faster than mine. I'm having a look to find out why - probably the tally-table generation. Yours...
October 8, 2012 at 4:16 am
Viewing 15 posts - 2,596 through 2,610 (of 3,957 total)