Forum Replies Created

Viewing 15 posts - 6,826 through 6,840 (of 49,552 total)

  • RE: Correlated Subquery?

    No, that won't even run.

    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: Error while using CASE in INSERT INTO statement

    The syntax for a CASE is

    CASE <variable>

    WHEN <expression1>

    THEN <value1>

    WHEN <expression2>

    THEN <value2>

    WHEN <expression3>

    THEN <value3>

    ...

    END

    You're first missing a THEN after the expression, second you're trying...

    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 Select

    I'm not asking you to create tables. I'm asking for the definitions of the tables the data is in so that we can figure out a query for you.

    We need:

    -...

    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 Select

    Table definitions please (as CREATE TABLE statements), sample data (as INSERT statements) and expected results 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: Oldest non-distributed LSN but No Transactional Replication

    Irfan-358189 (1/8/2015)


    Hello Respected Team, I have a issue:

    Please don't post the same issue in multiple places. http://www.sqlservercentral.com/Forums/Topic1649574-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
  • RE: Log File keep growing and not getting truncated and shrink even Log backups are running fine.

    It's not permanent replication setup, it's to fix leftover pieces of replication.

    What I've seen several times is that sp_removedbreplication throws an error saying the DB's not replicated, but there are...

    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 Checklist for Performance

    jeffem (1/8/2015)


    using multiple views is very often going to include tables that aren't at all necessary to the core logic of what you're trying to accomplish.

    Depending on the view (especially...

    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: dbcc dbcc show_Statistics question

    Table is empty. No rows in the table means that the statistics objects are empty.

    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: Mirroring & Database backup

    Grant Fritchey (1/7/2015)


    Running a RESTORE WITH VERIFY_ONLY, which is what the backup validation does, shouldn't interfere with log shipping or anything else on your server.

    It also won't verify that 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: IF statement in WHERE

    2Tall (1/8/2015)


    Hi. The IN was used as the parameter in the report accepts multiple values.

    Except IN doesn't work that way.

    DECLARE @SomeTable TABLE (SomeColumn VARCHAR(20))

    INSERT INTO @SomeTable

    Values ('A'),('B'),('C'),('''A'',''B'',''C''');

    DECLARE @Statuses...

    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: Log File keep growing and not getting truncated and shrink even Log backups are running fine.

    Create a transactional replication publication, publish a single article (small table). Set it not to create a snapshot (no point). Once complete, drop the publication. See if that removes 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: DB Shrink post mortem - file sizes and freespace

    JarJar (1/8/2015)


    (My guess is that the report does not account for unused space in the pages and that the shrink operation "packed" the pages full.

    Shrink does not do...

    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: IF statement in WHERE

    2Tall (1/8/2015)


    Thanks for your quick response.

    WHERE

    ecnt.EngineeringChangeNoteTypeId = @ECNType

    AND ecn.SystemType = @status AND

    CASE WHEN @status = 'C' AND ecn.FinishingEffectivityDate >=@StartDate AND ecn.FinishingEffectivityDate<=@EndDate THEN 1

    WHEN @status != 'C' AND ecn.CreatedDate...

    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: IF statement in WHERE

    CASE WHEN @Status = 'C' AND ecn.FinishingEffectivityDate >=@StartDate AND ecn.FinishingEffectivityDate<=@EndDate THEN 1

    WHEN @Status != 'C' AND ecn.CreatedDate >=@StartDate AND ecn.CreatedDate <=@EndDate THEN 1

    ELSE 0

    END = 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: Execute Permission Problem on Stored Procedure

    Chris Wooding (1/8/2015)


    It is a member of other groups with server logins, but none of these are linked to users in the database.

    Sounds weird, but try taking that user out...

    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 - 6,826 through 6,840 (of 49,552 total)