Viewing 15 posts - 211 through 225 (of 616 total)
My solution so far:
select DISTINCt c.baseID, CASE WHEN Master_ID = c.BaseID THEN a.Duplicate_ID else Master_ID END
from SCC as a
cross apply (select MAX(master_ID) AS BaseID
from SCC as b
where b.duplicate_id = a.duplicate_id)...
May 10, 2013 at 6:26 am
Here you go:
create table SCC (Master_ID INT, Duplicate_ID INT)
INSERT INTO SCC
SELECT 52941, 8388 UNION ALL
SELECT 52941, 15799 UNION ALL
SELECT 80833, 8388 UNION ALL
SELECT 80833, 15799
May 10, 2013 at 5:45 am
Most likely to be a security issue. What account is the SQL Server service using? Does the account have the required permission on the D drive?
May 9, 2013 at 4:32 am
Another alternative is to use Access as the front end for your SQL Server database. I haven't used Access in years but from what I remember, it was pretty straightforward...
May 9, 2013 at 3:17 am
Apologies if I wasn't clear enough with my original post. The site ID is just a unique number that gets assigned to each group so it could be 1, 2,...
May 8, 2013 at 2:14 am
Not the most elegant solution but I've come up with this:
;with CTE_SiteMatchByCountry (Retained_RID, Dropped_RID, Country, theRank)
AS
(SELECT RetainedRID, DroppedRID, Country,
DENSE_RANK() OVER (ORDER BY RetainedRID)
FROM SiteMatches)
SELECT Retained_RID, Country, theRank
FROM CTE_SiteMatchByCountry
GROUP BY Retained_RID,...
May 7, 2013 at 3:35 am
Lol... All the more reason to normalise the table.
April 30, 2013 at 1:11 pm
You can
1) decrease the width of your NVARCHAR columns from 1100 to 900 (that should keep you within the limit)
2) Normalise your table to have fewer columns in the...
April 30, 2013 at 3:01 am
John Mitchell-245523 (4/26/2013)
April 26, 2013 at 8:40 am
Why the two back slashes here?! z:\\xxx_TransactionLog_20130426091520.txt
April 26, 2013 at 8:33 am
js.cat (4/19/2013)
64 GB RAM
2 x Intel 320 SSD 120GB RAID1
2 x SATA3 1TB RAID 1
We're going to use this server for our SQL Server...
April 26, 2013 at 8:21 am
It's okay, I'm sorry I take it back. 🙂
April 25, 2013 at 2:40 pm
Lol I've taken a chill pill myself... I called her a pedant in an earlier post. In hindsight there was no need. Apologies if I've offended anyone.
April 25, 2013 at 1:56 pm
Some weeks ago I had this issue. I used table variables to solve a problem. They were great until requirements changed and the code had to be adapted to deal...
April 25, 2013 at 12:13 pm
Viewing 15 posts - 211 through 225 (of 616 total)