Forum Replies Created

Viewing 15 posts - 42,556 through 42,570 (of 49,552 total)

  • RE: Problem with compilation of SQL Code

    Call another procedure.

    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 to down grade a database from sql server 2005 to 2000

    You'll have to generate scripts of all of the objects in the DB - tables, views, procedures, functions, users, etc. Then you'll have to export the data. bcp works, as...

    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 Express 2005 problem

    Database restores (including log restores)

    Autoclose (a good candidate on SQL Express)

    Some sp_configure alterations

    DBCC FREEPROCCACHE

    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: Product enhancement suggestion - background colours in query windows

    Post it on Connect and see what the MS people say.

    The info bar at the bottom of the screen does change colour (in SQL 2008) based on what server you're...

    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: Find recently altered tables and SP's

    umanpowered (11/5/2008)


    I went directly into a table in SQL 2005, and change a column. I closed

    the table. The 'modify_date' is still showing the previous date.

    I'm using 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: Moving from SQL Server 2005 to 2008

    You can restore the backup to 2008. Databases can always be upgraded in version, never downgraded.

    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: flags for Alternate Rows

    Try something like this

    SELECT * , ROW_NUMBER() OVER (ORDER BY ID) % 2 AS AlternatingFlag

    FROM SomeTable

    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: Deadlock occured?

    madhu.arda (12/4/2008)


    is that possible that the dead lock happened in different database 12 which not mentioned in the dead lock graph?

    The dead lock resources were on the two tables in...

    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 an AFTER trigger that prevents exceeding 250 work hours

    As I said above, you don't need an update in the trigger. The trigger is fired by an update, there's no need to repeat that update within the trigger.

    You 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: Multiple Optional Parameters

    That kind of catch-all query doesn't perform well at all. On SQL 2000 there's no way to make it perform well

    Have a look at this thread - http://www.sqlservercentral.com/Forums/Topic599065-65-1.aspx

    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: Look up a table fields, data type, etc.

    sp_help 'tbl'

    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 Query not returning records for today

    Use dateadd to remove 8 hours from the two datetimes. Is it because sharepoint stored times in GMT?

    SELECT NVARCHAR1, NVARCHAR6, DATEADD(hh,-8,Datetime1) as StartTime, DATEADD(hh,-8,Datetime2) AS EndTime

    FROM PROWSS_Content.dbo.alluserdata

    WHERE DATEADD(dd, DATEDIFF(dd,0,getdate()),0) BETWEEN...

    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: Move SQL Structure from C: drive to D: drive

    George Dickson (12/4/2008)


    But SQL 2005 doesn't give you an option to place the SQL Server files anywere else, does it?

    It does during the installation

    I hope I don't have to re-install....

    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 an AFTER trigger that prevents exceeding 250 work hours

    You don't need an update in the trigger. The trigger is fired by the update. If you want to check the new values, use the inserted table. deleted, in 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: SQL Query not returning records for today

    You can add a filter on the nvarchar6 for the room you want to display.

    SELECT NVARCHAR1, NVARCHAR6, Datetime1, Datetime2

    FROM PROWSS_Content.dbo.alluserdata

    WHERE (DateTime1 >= DATEADD(dd, DATEDIFF(dd,0,getdate()),0) AND DateTime1 < DATEADD(dd, DATEDIFF(dd,0,getdate())+1,0))

    ...

    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 - 42,556 through 42,570 (of 49,552 total)