Forum Replies Created

Viewing 15 posts - 38,251 through 38,265 (of 49,552 total)

  • RE: GETDATE() remove Time

    Converting to varchar's one of the the slowest ways to trim the time from a date. Also watch out for the edge cases. Between's inclusive on both sides. If 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: Sysindexes table Cannot Repair

    CheckDB will never repair damage to any of the system tables.

    Can you please run the following and post the entire output?

    DBCC CHECKDB (< Database Name > ) WITH NO_INFOMSGS, ALL_ERRORMSGS

    Take...

    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: Include field in SELECT but don't output?

    What error do you get if you remove yl_rangename from the select? (leave it in the group by)

    One other thing. You should be able to remove the RTRIM from 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: Efficient way of stripping time part from Datetime.

    Don't understand your question. A datetime has no defined format, it's a date, format is a string property. The format that you see in queries is defined by your regional...

    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: Include field in SELECT but don't output?

    Post the 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: Forum best practice - quoting code

    In the reply screen, take a look to the left of the text area. You'll see several IFCode shortcuts. Highlight your code and click the code shortcut, or you can...

    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: Async stored procedure calling

    One way is to use Service broker. Set the procedure that you want to run async as the activation procedure for a service broker queue and send a message when...

    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: printing 1 to 100 in SQL Server as a batch....

    SELECT TOP (100) ROW_NUMBER() OVER (ORDER BY Object_id)

    FROM master.sys.columns

    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: Efficient way of stripping time part from Datetime.

    DECLARE @TheDate DATETIME

    SET @TheDate = '2008-01-01 12:12:12:223'

    SELECT dateadd(dd, datediff(dd,0, @TheDate),0)

    See http://sqlinthewild.co.za/index.php/2007/11/05/datetime-manipulation/

    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 Master database

    You could restore a backup of the master database that was taken before the tables were added. You do have a backup of master?

    If you rebuild master you will lose...

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

    Look at the joins. There's only one column from each table referenced in the joins. Hence to start with, create an index on each column that's referenced in the join...

    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 performance query with subquery

    How many rows are in the table Loja_Venda? Exec plan gives estimated 2.3 rows, actual 15 million, and that's for the results of an index scan with a predicate on...

    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 hints and Table Hints

    sarvesh singh (6/22/2009)


    I'll read up more on this and do some tests on our test server before using it in live systems.

    Don't use hints unless you are absolutely, totally, 100%...

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

    In most cases, SQL will only use a single index per table to satisfy a query. So, let's say that there's a query with a where clause like this

    WHERE phone...

    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: Trying to creating linked server from sql 2000 to sql 2008 -- not working!

    Duplicate post. No replies to this thread please. Direct replies to:http://www.sqlservercentral.com/Forums/Topic739638-146-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

Viewing 15 posts - 38,251 through 38,265 (of 49,552 total)