Forum Replies Created

Viewing 15 posts - 181 through 195 (of 1,241 total)

  • Reply To: Need help optimizing TSQL

    ScottPletcher wrote:

    aaron.reese wrote:

    It really depends on whether you understand the consequences of NOLOCK.  It can result in a 'dirty read' if there are uncomitted transactions in the database that affect...

    ----------------------------------------------------

  • Reply To: clustered index usage

    Brahmanand Shukla wrote:

    Yes, agree that it would benefit in the read loads. But we should also consider the overhead of CI on write operations. So if the database is read-intensive then...

    ----------------------------------------------------

  • Reply To: Customized Schedule Job through TSQL

    If you have source control at your shop (like GIT) you may be able to see how other Jobs are scripted and pull out the block of code that defines...

    ----------------------------------------------------

  • Reply To: Need help optimizing TSQL

    Jonathan AC Roberts wrote:

    Does an estimated execution plan find any missing indexes?

    To speed the query up you could try putting an index on the Customer table with the leading edge on columns...

    ----------------------------------------------------

  • Reply To: security related question

    One example would be when you want to allow select to a 'tableA' from the accountingGroup. Then you realise that there is a member of that group who you would...

    ----------------------------------------------------

  • Reply To: How to copy rows from the same table and update the ID column?

    BOR15K wrote:

    I appreciate it is utterly trivial question, and yet... When you have a small amount of columns, there is a simple solution, sort of

    INSERT INTO myTable
    SELECT...

    ----------------------------------------------------

  • Reply To: case Statement with Cte

    Seems like this user is posting exam questions on the forum.

    ----------------------------------------------------

  • Reply To: 3 calculations on different levels

    This will illustrate what I was trying to point out initially

    Try the following sample data and see results

    Create table #myTemp(
    area varchar(10),
    store varchar(10),
    totalStoreSales int
    );
    go

    insert into #myTemp
    values
    ('area_a', 'store1',...

    • This reply was modified 4 years, 5 months ago by MMartin1.

    ----------------------------------------------------

  • Reply To: ORDER BY items must appear in the select list if SELECT DISTINCT is specified.

    SELECT DISTINCT [Name] FROM

    Should not that be Select distinct @columnsList .... etc....?

    I have a feeling you could make use of sp_executeSQL.

    ----------------------------------------------------

  • Reply To: an idea please on warnning

    If you can post the whole message it would be of help. This could indicate your statistics are outdated. A bad estimation of rows could lead to a scan instead...

    ----------------------------------------------------

  • Reply To: 3 calculations on different levels

    You are joining here the forcast on chain and location. Do you need to join on both conditions? In the visualisation tool there may be a setting to treat this...

    ----------------------------------------------------

  • Reply To: Change ANSI_NULLs option for a table

    It fails because the underlying table was created with ANSI_NULLS set to off.

    ----------------------------------------------------

  • Reply To: Change ANSI_NULLs option for a table

    Old post, but I ran into this issue recently.

    I get an error when trying to create a 'filtered' non clustered index only. A non filtered variety works just fine. Seems...

    ----------------------------------------------------

  • Reply To: Worse Before Better

    This is an excellent diagram. I saved a copy as well.

    ----------------------------------------------------

  • Reply To: Worse Before Better

    The problem starts with management. We live in a time when people have short attention spans and want to see results now. Imagine telling a top level manager that what...

    ----------------------------------------------------

Viewing 15 posts - 181 through 195 (of 1,241 total)