Forum Replies Created

Viewing 15 posts - 49,531 through 49,545 (of 49,552 total)

  • RE: Select statement

    SELECT MAX(id) FROM Table GROUP BY age, height, gender

    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: Stripping the time value from datetime

    Re performance, I'm just speaking from prior experience. I do MIS and as such run very large, very long queries. I found that changing the date rounding method from 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: Stripping the time value from datetime

    This also works well. In practise I've found it a bit faster (though usually too little to notice)

    Set @DATE = CAST(FLOOR(CAST (getdate() AS FLOAT)) AS DATETIME)

    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: Selecting multi values from Views in a join? help!

    Try this

    Select A.pId from tblPrp A

    where A.p_id in (

    select p_id from FacilityText where fac_id in (1,2)

    group by p_id

    having count(id)=2)

    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: A tale of two where clauses...

    Run them in Query analyser with the execution plan enabled, see where the difference lies

    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: OUTPUT Info needed

    I'm guessing you're only passing 3 parameters to the stored procedure

    You have to declare and pass a variable for the proc to return a value. Output parameters are different to...

    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: Cant drop a trigger

    Sorry for the misunderstanding about syntax. I'm not used to seeing tables owned by anyone other than dbo.

    Have a look here http://support.microsoft.com/default.aspx?scid=kb;en-us;827448 (MS knowledge base article 827448). See if 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: Cant drop a trigger

    What xtype did you get? If it's TR, then I don't know what's wrong. If that's the case, then maybe you could post the entire script (if it's not too...

    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: Cant drop a trigger

    UTR_Duplicate_REQ might be something other than a trigger

    run the below query and see what you get for xtype

    select xtype from sysobjects where name='UTR_Duplicate_REQ'

    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: Question of the Day for 15 Jul 2004

    I also disagree with the answer. I'm guessing books online is wrong. Syscolumns contains 1 row for each parameter in a udf, as well as an additional row that, I'm...

    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: Replication system tables

    Unfortunatly I have no control over table names. Amoung the tables I have in this db are a couple called System_

    I can do some sql to find all tables 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: Retrieving object create date without using sysobjects

    sp_help '

    '

    I'm guessing it uses sysobjects in the background and it's not much use if you want to use the date in later code.

    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: Retrying a failed ftp job

    Looks perfect. Thanks for your help

    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: Question of the Day for 15 Jun 2004

    srowlands: a trigger fires once per operation. If an update affects 20 rows of a table and there is an update trigger, then the trigger will fire once and both...

    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: Best way to change the data type of a replicated column/table

    I'm no expert on replication, but can't you do a sp_repladdcolumn to create a temp column, copy the data over, sp_repldropcolumn to remove the old one, then do another sp_repladdcolumn...

    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 - 49,531 through 49,545 (of 49,552 total)