Forum Replies Created

Viewing 15 posts - 2,311 through 2,325 (of 49,552 total)

  • RE: What is the best way to use LIKE in my situation

    More like

    declare @StartDate datetime,

    @EndDate datetime;

    set @StartDate='2016-09-01';

    set @EndDate='2016-09-30';

    --Get inpatient VisitID's to look up

    selectHRVD.SourceID,

    HRVD.VisitID,

    PADQ.*

    from livefdb.dbo.HimRec_VisitData HRVD

    inner join livefdb.dbo.PcsAssmntData_Queries PADQ

    on HRVD.SourceID=PADQ.SourceID

    and PADQ.PcsAssmntDataID = <fill this in>

    where HRVD.SourceID='BRO'

    and HRVD.VisitType_MisRegTypeID='IN'

    and HRVD.RegistrationDateTime>=@StartDate and HRVD.RegistrationDateTime<dateadd(day,...

    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: What is the best way to use LIKE in my situation

    You're looking at a join there, not a 'passed value'.

    FROM from livefdb.dbo.HimRec_VisitData INNER JOIN livefdb.dbo.PcsAssmntData_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: Are the posted questions getting worse?

    Grant Fritchey (9/29/2016)


    Personally, I can't help it, I go for humor.

    Same. I'm always going to be poking fun at something in a presentation (in the one I did this...

    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: What is the best way to use LIKE in my situation

    Sure, because then it'll be

    PcsAssmntDataID = @SomeValue + '{A^GEN.ADMPART2}', and that's SARGable.

    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: What is the best way to use LIKE in my situation

    RIGHT should give you exactly the same results and performance. The clustered index order is not ideal for that query, but might be hard to change (you'll have to make...

    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?

    Rehearse the presentation. To the wall, to your pets, to a willing victim. Doesn't matter, just make sure you run through it a few times.

    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 2014 can't use more than 32GB RAM?

    Enterprise edition can use OS maximum of memory, so more than you have.

    What do you mean by "it looks like SQL Server can't use more than 32GB of RAM"? 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: Replication - Multiple Tables to 1 Table ?

    homebrew01 (9/28/2016)


    The thinking was a denormalized flat file, with indexed columns would give fast search results.

    Have you tested that thinking out and confirmed it? If not, do some tests before...

    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 - Multiple Tables to 1 Table ?

    No. The destination schema must match the origin schema (can be hacked, I've done it, caused unending pain).

    These tables are on different servers?

    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?

    For me, sorry I thought the second paragraph would have made that clear.

    Also, sorted enough. Got some stats from SQLCat and a few other places, and got enough examples 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: Are the posted questions getting worse?

    Reposting from twitter:

    "I'm looking for examples of extremely big or extremely busy relational database systems doesn't have to be SQL Server."

    Case studies or similar, don't need detail, just

    It's 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: Transaction Not commiting when run on wrong DB

    Phil Parkin (9/28/2016)


    So I checked Tools/Options/Query Execution/SQL Server/Advanced

    and see that I have

    SET XACT_ABORT

    checked ... so that was doing the sweeping up for me.

    You have the latest SSMS 2016?...

    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: Transaction Not commiting when run on wrong DB

    Phil Parkin (9/28/2016)


    The code does not even run.

    It does (try it, you'll end up with @@TRancount of 1), because of deferred compile.

    When the batch is parsed, the 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: prerequisites

    Several days spent reading up on the feature (as it's not simple) and a test environment where you can practice.

    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: Transaction Not commiting when run on wrong DB

    It's a parse error and try-catch cannot catch parse errors.

    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 - 2,311 through 2,325 (of 49,552 total)