Forum Replies Created

Viewing 15 posts - 5,671 through 5,685 (of 49,552 total)

  • RE: t-sql query not use same execution plan

    Figure out why the plans are different (probably has to do with data volume), then figure out if you really want production using the development plan (hint, you usually 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: Clearing Temp tables

    At the end of your batch, run DROP TABLE, then you won't get an error when you create it at the beginning.

    Or, comment out the CREATE TABLE and TRUNCATE TABLE...

    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: Avoid blocking and deadlock

    Write queries efficiently, make sure that there are supporting indexes. That's mostly what it comes down 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: Update Statement and Case Statement

    dwilliscp (6/5/2015)


    UPDATEA

    SETReserve_Pct = case when y.Reserve_Pct_Overwritten = 1

    then y.[Reserve_Pct] else a.[Reserve_Pct] end

    That will work fine.

    The error was because you left in a column alias from when it was...

    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: Problem with backups (Copy-Only)

    Chrille (6/5/2015)


    I thought that by running DB1's nightly FULL backup in COPY-ONLY mode, it wouldn't interfere with our normal backup plans restore sequence.

    Correct, it doesn't.

    Well, more specifically it doesn't interfere...

    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 tables and user defined data types in sql server

    Make it a separate table and join them in your queries.

    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 cast this as nvarchar!

    GG_BI_GG (6/5/2015)


    GilaMonster (6/5/2015)


    CAST(<source column>) as NVarchar(1))

    CAST(('0' as franchiseevendaccount) as NVARCHAR(1))

    ---

    Incorrect syntax near the keyword 'as'.

    Well, yes that's going to give an error. Aliases go after the column definition, not 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: SQL 2012 memory pressure

    ioana-477197 (6/5/2015)


    @ 1) I am not sure what those 58GB are reserved for; i thought they were for query execution. So ... please excuse a dummy question: could you please...

    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 cast this as nvarchar!

    CAST(<source column>) as NVarchar(1))

    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: Avoid LEFT join

    Jeff Moden (6/4/2015)


    Opening a new thread probably won't change those facts. 😉

    He posted a new thread, posted a query slightly different to the one here (with a few WHERE clause...

    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: Are the posted questions getting worse?

    Ed Wagner (6/4/2015)


    I think there's a fundamental lack of understanding and resistance to learning that I don't know if I can overcome.

    He's borderline on my blacklist because of that. Feel...

    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

    ChrisM@Work (6/4/2015)


    spectra (6/4/2015)


    Ok. not an issue. Is it possible to write this in pure SQL way ? (so that I don't face database migration issue later)

    My 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: Migrate from SQL Server 2000 to SQL Server 2012 Express

    jwashburn 18707 (6/4/2015)


    but the only likely result I see would be more page faults and heavier use of virtual memory but nothing that should adversely impact the users.

    Errr, no.

    SQL Server...

    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: Migrate from SQL Server 2000 to SQL Server 2012 Express

    sgmunson (6/4/2015)


    I don't think SQL Express is by license, allowed to support multiple users, regardless of the MS Access intermediary...

    You're thinking about MSDE, the free version of SQL 2000. Express...

    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: Are the posted questions getting worse?

    And, back on topic, can anyone help our poor, out-of-his-depth friend with locating a time machine?

    http://www.sqlservercentral.com/Forums/Topic1691611-391-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 - 5,671 through 5,685 (of 49,552 total)