Forum Replies Created

Viewing 15 posts - 45,901 through 45,915 (of 49,552 total)

  • RE: Create a Dynamic Table using a cursor

    Sorry, my mistake. The exec line should have been.

    EXEC (@sSQL)

    Note the brackets.

    The reasons table is dynamic (we add reasons once in a while) and I'm making a summary of this...

    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: Update

    What error are you getting?

    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: doubts in Indexing

    mahesh.kumar (7/7/2008)


    Won't this composite non clustered index give a problem while inserting?.

    Shouldn't. It'll slow the insert a little, but unless you have lots and lots of indexes you should...

    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: Query in sql

    Based on the sample you gave, what do you want returning?

    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: Slow queries in reporting services! Bug or feature?

    Could be fragmentation, could be out of date statistics. There are reasons for SQL not to use an index that looks perfect.

    Edit: Sounds like it could also be parameter sniffing.

    Could...

    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: Query in sql

    Please could you post your table definition, sample data (as insert statements) and desired output

    see - http://www.sqlservercentral.com/articles/Best+Practices/61537/

    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 a Dynamic Table using a cursor

    You can't use variables within an alter table statement. You're going to need dynamic SQL for this.

    DECLARE @Reason nvarchar(10), @sSQL NVARCHAR(500)

    DECLARE cr cursor local FAST_FORWARD for

    SELECT DISTINCT [Reason]

    FROM Reason_T

    open cr

    fetch...

    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: Creating a View using a Cursor

    Ah. In that case, please could you post the schema for the table you have the DB names in, a couple of rows from that table and the result 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: Creating a View using a Cursor

    DamienB (7/7/2008)


    A cursor seems suited to this job from what I've read, but maybe someone can offer a better way? I can see the common suggestion to never use cursors...

    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: doubts in Indexing

    In that case, you need to cover that query for the index to be remotely useful. It's not selective enough otherwise.

    CREATE NONCLUSTERED INDEX idx_gpsdatahistory1April_RegistrationNoGpsDate

    ON gpsdata_history1_April (Registrationno, gps_datetime)

    INCLUDE...

    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: To Certify or Not To Certify

    Jeff Moden (7/7/2008)


    I just took a look at the "Developer" requirements from MS... there seems so be a fair number of areas on cursors and optimizing cursors. Does that,...

    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 Profiler andFiltering

    peace2007 (7/6/2008)


    Thanks for the reply 🙂

    I'd like to monitor my stored procedures on another server. I think I should use SP_Counts or TSQL_SPs templates but what if I need a...

    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 do I move SQL from 32 to 64?

    Doctor Who 2 (7/5/2008)


    Really, Gail? I would have thought there would have been some difference. Is it all within the SQL Server executable, then? I guess it...

    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: To Certify or Not To Certify

    Steve Jones - Editor (7/6/2008)


    I think the simulation path is the way to move. I know lots of people were tripped up on the 70-431 sims of SSMS.

    Yup. Several of...

    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: Clear Message in Stored Procedure

    swtrans (7/6/2008)


    I reloaded service pack 4 for sql server ... and was able to get to the properties window. I set the database to the simple recovery...

    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 - 45,901 through 45,915 (of 49,552 total)