Viewing 15 posts - 2,536 through 2,550 (of 3,957 total)
Take a look at using ROW_NUMBER() in MS BOL.
If you can't figure it out post some DDL and sample data (consumable form) where your query would return duplicates. Identify...
October 31, 2012 at 7:11 pm
This should also work:
;WITH YOY AS (
SELECT Years = DATENAME(year, EnrollDate)
,COUNT(MemberID) as TotalMembers
FROM dbo.Enrollment...
October 31, 2012 at 7:07 pm
Eugene Elutin (10/30/2012)
Jeff Moden (10/30/2012)
dwain.c (10/29/2012)
Jeff Moden (10/29/2012)
It's a fun problem but I wouldn't actually help anyone put such a thing into production for the reasons I've already stated.
Sorry about...
October 30, 2012 at 7:38 pm
angelrapallo 90775 (10/30/2012)
i could handle dynamic maybe in the future, becuase i use little dynamic, i use a different technique
to avoid...
October 30, 2012 at 7:34 pm
Jeff Moden (10/30/2012)
dwain.c (10/30/2012)
Definitely can't wait to see what Jeff comes up with. The man is in a class all by himself.
Thanks for the compliment :blush: but seriously not...
October 30, 2012 at 7:27 pm
webtekkie (10/30/2012)
October 30, 2012 at 7:18 pm
webtekkie (10/30/2012)
Jeff - I've checked with the data sourcing team - they have told...
October 30, 2012 at 5:23 am
Or you could construct a query against your table as follows to check total actual string lengths for both scenarios.
Assume the column (Your_Column) in your table (YourTable) is VARCHAR(100):
SELECT VARCHAR=SUM(2...
October 30, 2012 at 2:57 am
eugene.pipko (10/29/2012)
I guess what I am trying to do is to let the other...
October 30, 2012 at 2:23 am
Jason-299789 (10/30/2012)
dwain.c (10/30/2012)
-- DDL
DECLARE @T TABLE
(RecordID INT, ItemID INT, MaxOfCost...
October 30, 2012 at 2:19 am
In the future, you should provide DDL and consumable sample data in the format I've included below.
-- DDL
DECLARE @T TABLE
(RecordID INT, ItemID INT, MaxOfCost MONEY)
-- Consumable...
October 30, 2012 at 2:10 am
SQLRNNR (10/30/2012)
L' Eomot Inversé (10/29/2012)
October 30, 2012 at 12:22 am
Angel,
This is indeed a pretty cool script.
I ran it against a small database of mine, after changing '[msdb]' to '[My database].' Aside from some of the information printed still...
October 29, 2012 at 11:57 pm
Jeff Moden (10/29/2012)
It's a fun problem but I wouldn't actually help anyone put such a thing into production for the reasons I've already stated.
Sorry about that! Just couldn't help...
October 29, 2012 at 10:21 pm
Jeff Moden (10/29/2012)
webtekkie (10/29/2012)
Eugene - Max size for Value1 is 7 chars and for Value2 is 10 chars.
Just to be sure, Value 1 will only contain 1 to 7 characters...
October 29, 2012 at 10:18 pm
Viewing 15 posts - 2,536 through 2,550 (of 3,957 total)