Forum Replies Created

Viewing 15 posts - 47,401 through 47,415 (of 49,552 total)

  • RE: Using A Coalesce Function in a Where in Clause

    Please don't cross post. It wastes people's time and fragments replies. I answered your other post.

    Replies to the following thread please - How to do Coalesce

    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 do coalesce with in

    I'm not sure what you're trying to do with Coalesce. Coalesce just returns the first non-null expression from the arguments passed to it. So

    Coalesce('1,2',idcol) will return '1,2' always, since it's...

    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: encrypted fields in my database

    My database seems to be somehow encrypted by the software I used

    What software are you using?

    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: select statement with order by

    Nisha (2/11/2008)


    Gail, do you mean the syntax is incorrect in SS 2k5?

    It's ambiguous. It isn't clear what you mean. Try this one

    SELECT DISTINCT FirstName as Name, LastName as Name

    FROM Person.Contact

    ORDER...

    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: PL SQL

    Thanks for been honest about it being homework.

    Show us what you've done so far and what problems you are having and someone will help.

    We don't do homework assignments for...

    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: select statement with order by

    If the server you're connecting to is SQL 2000 or the adventureworks DB you're using is in compatability mode 80, the query will work fine.

    Against a SQL 2005 server with...

    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: Production Support Levels

    What do you mean by 'producion support level'?

    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: Temp Tables and Dynamic SQL

    It's possible that this will be allowed in SQL 2008, as one of the changes in 2008 is to allow passing of table variables to stored procedures.

    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: sp VS adhoc query peformance?

    Check the sys.dm_exec_requests DMV. What are the long running queries waiting on?

    Have you rebuilt indexes recently?

    Does recompiling the procedure make any difference? (EXEC sp_recompile 'StoredProcName')

    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: Deleted data still in database

    Whe SQL deletes a row, it doesn't overwrite the entry on the data page, it just marks the space as available (pretty much same thing as on a file system...

    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: Shrink Database

    Shrinking databases is generally a bad idea. A database needs some space in it for normal operation.

    How long is a question that's very hard to answer. It depends on 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: help with the query speed

    Federico Zajur (2/8/2008)


    Hi all, I have an idea... Why don´t you use views. For example 3 views with 2 outer join each.. I think it will be more faster.. What...

    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: Get Month Name

    Not directly, though you could convert the month number inot a date.

    SELECT DATENAME(month,'1900/' + CAST(monthNumber AS VARCHAR(2)) + '/01')

    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: Get Month Name

    SQL has a DateName function, however it takes a datetime as a parameter, not a number

    SELECT DATENAME(month, GETDATE()) AS 'Month Name'

    returns

    Month Name ...

    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: DB Reindex Question

    in SQL 2000, I believe that rebuilding the clustred index rebuilds the nonclustered indxes. In SQL 2005, that's no longer the case.

    You can just use DBCC DBReindex to rebuild all...

    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,401 through 47,415 (of 49,552 total)