Forum Replies Created

Viewing 15 posts - 211 through 225 (of 616 total)

  • RE: Another grouping problem

    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)...

  • RE: Another grouping problem

    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

  • RE: Attaching database

    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?

  • RE: Simple 'front ends' for non-developer?!

    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...

  • RE: GROUP BY question

    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,...

  • RE: GROUP BY question

    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,...

  • RE: creating table error?

    Lol... All the more reason to normalise the table.

  • RE: creating table error?

    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...

  • RE: creating table error?

    Are the NVARCHAR columns necessary?

  • RE: Backups Failing

    John Mitchell-245523 (4/26/2013)


    Use a UNC path, not a mapped drive. The mapped drive is only visible to the user that mapped it, not to the SQL Server service account,...

  • RE: Backups Failing

    Why the two back slashes here?! z:\\xxx_TransactionLog_20130426091520.txt

  • RE: SSD + HDD Server, where I install os, sql binaries, mdf, ldf and tempDB?

    js.cat (4/19/2013)


    Hello, my company has a new Server:

    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...

  • RE: how pick value from database on sql server2000?

    It's okay, I'm sorry I take it back. 🙂

  • RE: SQL Server Query Performance Questions

    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.

  • RE: SQL Server Query Performance Questions

    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...

Viewing 15 posts - 211 through 225 (of 616 total)