Forum Replies Created

Viewing 15 posts - 871 through 885 (of 1,838 total)

  • RE: Correspond Row Data

    I'm not sure I understand why you added the line:
    AND V3.VariableID IN (64,65,66,67,68);

  • RE: Correspond Row Data

    OK, given these requirements, and knowing that there are potentially multiple versions of the Yes/No variables as well, maybe something like this:
    SELECT DocumentID, VariableID, ValueText, RevisionNo
     ...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin - Monday, July 10, 2017 5:30 AM

    I really hate it when coworkers say "I don't have time to figure that...

  • RE: Correspond Row Data

    If RV.RevisionNo is needed in the results, just include it in both halves of the UNION ALL query in the CTE.  I didn't have a dbo.Documents table in the testing...

  • RE: Master, Model, MSDB -Logfiles and Location

    Are the disks directly attached to the server or are they on a SAN?  If the files are located on a SAN then splitting things out into separate logical drives...

  • RE: Birds of a Feather

    Are we really OCD?  Or is it CDO... keeping the letters in their proper alphabetical order 😉

  • RE: Fast Query - Slow Report Generation - Why?

    Jack Corbett - Monday, July 10, 2017 11:26 AM

    Have you run a trace/XE session on the SQL Server to ensure...

  • RE: Correspond Row Data

    I had to invent my own data to try this, so it's not well tested, but maybe something like this:
    WITH VarYesNo AS
    (SELECT V.DocumentID, V.VariableID, V.ValueText, CAST(1...

  • RE: Correspond Row Data

    I might see a problem in your subquery for V2, I'm thinking it probably should include DocumentID in the SELECT and GROUP BY, and in the JOIN.  It might make...

  • RE: Convert Rows to Columns

    I think the example query you provided accidentally swapped VariableID and ValueText columns in your PIVOT clause.  You probably want:
    PIVOT
    (
    MAX (ValueText)
    FOR VariableID IN
    (...

  • RE: Simple/Easy Way To Test Stored Procedures And Functions

    vincentshanecurtis - Wednesday, July 5, 2017 7:16 PM

    Hi Guys,

    Does SQL Server provide a simple easy way to test stored procedures and functions? ...

  • RE: Learning Data Modeling

    I think a part of the problem is the way people approach it.  When I work with developers, they already have preconceived notions coming into a design session of what...

  • RE: How to add comments to your database

    I almost fell for Extended Attributes, but did guess the right answer.  I think that page of my memory might have been pushed out by the least recently used algorithm

  • RE: Views, Select & Windows Functions Performance General Question

    Can you give an example of what you were comparing for windowed function compared to select group by approach?  Is there an index on the windowed function's PARTITION BY and...

  • RE: Cache database list and properties when using MS SQL Studio

    When I try running this query after SET STATISTICS IO ON, it shows logical reads but not physical reads, even for a server that hasn't been logged into today.  How did...

Viewing 15 posts - 871 through 885 (of 1,838 total)