Forum Replies Created

Viewing 15 posts - 47,416 through 47,430 (of 49,552 total)

  • RE: IDENTITY column on PRIAMRY KEY list

    I'll second Loner.

    Clustered PK on the identity (Custered indexes should be narrow and unique)

    Add a unique nonclustered index on app_idz, msn, dash_id, received_from_dashboard

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: MERGE

    GSquared (2/7/2008)


    Actually, as far as total points go, you get as many for posting a complaint about the question as you would get for getting most questions right in the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Must declare the scalar variable "@Rank

    1) No, however if you're concatenating pieces of string together, you'll need a space somewhere.

    2) No. SQL doesn't care about whitespace. Lay things out that they are readable by you...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Must declare the scalar variable "@Rank

    It's declared outside of the dynamic SQL string. If you want the variable accessible inside the dynamic SQL, you either have to declare it within the dynamic SQL string, or...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Must declare the scalar variable "@Rank

    Variable declared outside dynamic SQL aren't accessible within it, and vis versa

    Your first line of dynamic SQL reads 'SELECT top 1 @Rank = K.RANK...'

    Within the dynamic SQL, the variable @Rank...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: MERGE

    Michael Kipp (2/7/2008)


    I think the question was asked in a wrong way (or I read it in a wrong way).

    I answered "WHEN NOT MATCHED", as most others.

    That is the part...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: ALTER TABLE IN CASCADE

    No there aren't. You will have to disable the foreign and primary key constraints to modify the column.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: ALTER TABLE IN CASCADE

    If the column you're altering is the one that the constraints are on, then you'll have to drop the constraints, make the changes, then recreate the constraints.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: SQL 2008 sneak peek exam info

    Thanks for the info. I forgot all about the meeting.

    Does anyone know how to get in on the beta exams?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Determine who granted priveleges to who

    SELECT Permission_name, class_desc, OBJECT_NAME(major_id), grantee.name AS 'Permission granted to', grantor.name AS 'Permission granted by'

    FROM sys.database_permissions dp

    INNER JOIN sys.database_principals grantee ON dp.grantee_principal_id = grantee.principal_id

    INNER JOIN sys.database_principals grantor ON dp.grantor_principal_id...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: MCA: Database

    I'd love to try it, but the cost is prohibitive, and the travel and hotels, aong with the required 4 weeks off work make it just about impossible.

    Exchange rates don't...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Create trigger on system table?

    Kenneth Fisher (2/6/2008)


    Honestly sounds really cool, and really scary at the same time :).

    It's both. We've had one incident when one of my colleagues detached the database that the trigger...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How can I limit CPU usage per user in SQL 2005?

    Yup. Petty much.

    I'd definitly suggest you see if she can get some SQL training, formally or informally. How long's it going to be before she does something like write an...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How can I limit CPU usage per user in SQL 2005?

    No. It's a query hint. It must be applied to a query, not a storedProc. It only applies to the query it's part of.

    SELECT Lots, of, columns

    FROM ReallyBigTable

    WHERE...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: TIMEOUT EXPIRED WHILE TRYING TO EXECUTE A VIEW MANUALLY FROM SQL SERVER 7

    A small nonclustered index (like what I suggested) shouldn't take too long. A clustered index will take a while. Depends on the hardware and the memory available how long

    If you...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 47,416 through 47,430 (of 49,552 total)