Forum Replies Created

Viewing 15 posts - 3,016 through 3,030 (of 15,381 total)

  • RE: SELECT COUNT(*) vs DMVs to get row count

    GilaMonster (4/13/2015)


    Alan.B (4/10/2015)


    Ok, quick update... I did some research on this - it appears that sys.partitions does not guarantee an accurate row count. According to Microsoft, the rows column in...

  • RE: SELECT COUNT(*) vs DMVs to get row count

    GilaMonster (4/13/2015)


    Sean Lange (4/10/2015)


    sql-lover (4/10/2015)


    Is this an accurate way to get row count?

    SELECT

    t.name table_name,

    s.name schema_name,

    p.rows AS total_rows

    FROM sys.tables t

    join sys.schemas s on (t.schema_id = s.schema_id)

    join sys.partitions p on (t.object_id =...

  • RE: Hiding columns with all zero values in dynamic pivot query

    sunitkrishna (4/13/2015)


    Sean,

    Thanks for the answer.

    This will work only when the designations are known beforehand,right?

    In my case the designations are not fixed and we take the values from the designation table.

    Any...

  • RE: SELECT COUNT(*) vs DMVs to get row count

    sql-lover (4/10/2015)


    So going back to my original question. If I want to be 100% sure that the table has zero rows, should I use COUNT(*) instead?

    Yes. If you want 100%...

  • RE: Trying to add a trigger that inserts original data from 1 table to another. With getdate() appended to 2nd table.

    Greg.Jackson (4/10/2015)


    How would I do that?

    You don't want to get the "last row" modified as you stated. You want to get ALL rows currently being modified. Remember that triggers in...

  • RE: SELECT COUNT(*) vs DMVs to get row count

    sql-lover (4/10/2015)


    Is this an accurate way to get row count?

    SELECT

    t.name table_name,

    s.name schema_name,

    p.rows AS total_rows

    FROM sys.tables t

    join sys.schemas s on (t.schema_id = s.schema_id)

    join sys.partitions p on (t.object_id = p.object_id)

    WHERE p.index_id in...

  • RE: Help with a SQL Query

    yb751 (4/10/2015)


    Sean Lange (4/10/2015)


    Slightly off topic here but I have to ask. When you say In/Out what does True represent?

    This is wrong on a couple of levels. The first...

  • RE: Help with a SQL Query

    Slightly off topic here but I have to ask. When you say In/Out what does True represent?

    This is wrong on a couple of levels. The first is that the...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (4/10/2015)


    Grant Fritchey (4/10/2015)


    Is everyone OK? Are people ill or something? Because this just happened and it has me concerned:

    Not that I've ever been that high, but I'm putting...

  • RE: Matching Column IDs based on field contents

    tomsharp85 (4/10/2015)


    Hi Steve, I am not sure what you mean "What are you going to do when you want to have a SicText5? Or a 4th PreviousName?" How could I...

  • RE: Optimize memory with varchar(max) datatype

    J0shu@ (4/10/2015)


    Thank you so much Sean, this is very helpful. I also tested the implementation of CDC which the process looks to work quite well across all modifications to the...

  • RE: Optimize memory with varchar(max) datatype

    J0shu@ (4/10/2015)


    Thank you so much Sean for the great example.

    A quick question \ concern (probably due to my lack of knowledge)

    If I opt for essentially going horizontal vs....

  • RE: script, that returns all SPs to a given table, incl. the access type

    maurer.martina (4/10/2015)


    I see, there is no short way...

    30 years ago I write a cobol-parser in 6 weeks in programming langage "turbo pascal". But cobol was/is an easy language, and I...

  • RE: Optimize memory with varchar(max) datatype

    J0shu@ (4/9/2015)


    Ok got it. I elected for EAV for ease to identify what attributes are getting updated and consolidating into a single column vs. having to scan across the table...

  • RE: Count Distinct

    SQL_Surfer (4/9/2015)


    Sorry, I attached incomplete plan. I've reattached the complete plan.

    Thanks for the updated plan. Now can you post all the other information needed to help? The article I reference...

Viewing 15 posts - 3,016 through 3,030 (of 15,381 total)