Forum Replies Created

Viewing 15 posts - 48,991 through 49,005 (of 49,552 total)

  • RE: Is this true? (Order by goof up)

    Some comments on order by

    SQL is allowed to ignore an order by in a subquery, if there is no top present. There is no order guarenteed in the following query.

    SELECT...

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

    What we do is to insert the results of xp_cmdshell into a table then check the table for error messages.

    It's not a perfect solution, as you have to do...

    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: Performance issue with SQL Server 2000

    If autoshrink is on, switch it off. Autoshrink should never be on for a production database.

    Other than the issue where you don't know when its going to shrink, and may...

    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: Deleting Records whose Date is Less than..

    It's just the excel formatting. Nothing wrong with the data

    Highlight the cells, and apply one of the formats under date.

    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: help with sql server 2000 sp4-->emergency

    What error messages are you getting from the application when you try and connect?

    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 Efficiency Help

    Ah, sorry. I misunderstood 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: Need to copy a block of records within same table

    Yes, but you need to find out what field is the pk and how the values for it are generated. It may be an autogenerated value, it may be 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: Need to copy a block of records within same table

    Once more with feeling. Don't take the primary key off unless you know exactly what you're doingf and exactly what the consequences will be.

    It's there to ensure data integrity....

    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: Performance issue with SQL Server 2000

    There's often a lag in stats update with large tables, even if autoupdate is on. I've seen it a few times on my 50+ million row tables.

    Do an update stats,...

    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: Need to copy a block of records within same table

    You'll have to look at the database structure to find what field is the pk, or ask someone who knows the system. You can see the db structure with Query...

    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 server process memory usage

    It means that your stored procedures are taking too long to execute.

    The connection from the web server has a timout set in it, if the server doesn't return results...

    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: Need to copy a block of records within same table

    It means that you have a primary key on the table, a constraint that forces all values in a column to be unique.

    Since you tried to insert duplicate values...

    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: Need to copy a block of records within same table

    Insert into Service (GroupNo,ServiceCode,ServiceName,SystemNo,Upload,ControlNo)

    SELECT 6,ServiceCode,ServiceName,SystemNo,Upload,ControlNo

    FROM Service

    WHERE GroupNo=1

    The select takes all the records in Service that have a GroupNo of 1 (Where...)

    The constant in the select clause (SELECT 6, ...) means...

    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 Efficiency Help

    Why? Sum ignores nulls. It will add up non-null values. The isnull around the sum is just incase the entire column is null or there are no records. That's 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: Nested values in a table

    Yes, and you have to join it as meny times as there are levels in the nesting.

    Just a warning. It's not going to run fast. I'd recomend that 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 - 48,991 through 49,005 (of 49,552 total)