Forum Replies Created

Viewing 15 posts - 3,691 through 3,705 (of 8,731 total)

  • RE: Maintenaince Plan Wizard help!

    It's not exactly about the users, but about how the data changes.

    Ideally, you'll do it daily. However, you might not need to have index/statistics maintenance tasks daily and you can...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Maintenaince Plan Wizard help!

    It won't delete data, but you really want to remove the Shrink Database option from your maintenance plan.

    For more information, read this (and the links in that article): http://www.brentozar.com/archive/2009/08/stop-shrinking-your-database-files-seriously-now/

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Converting a date

    Sean Lange (12/2/2015)


    cory.bullard76 (12/2/2015)


    Ok, it is a date time field type....and I show records for Dec 1 2015.....but, when I say that field = 12/01/2015 I get 0 results

    That is...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Gazareth (12/2/2015)


    jasona.work (12/2/2015)


    Hmm...

    Here's a way to maybe sort of settle the semi-colon discussion amongst the forum dwellers!

    PAINTBALL!

    Split into two teams, semi-colon as statement terminators vs semi-colons OK at the start...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Large differences between estimated and actual row counts but stats are OK

    Scalar UDFs have problems with plan/row estimates. I'll try to avoid them at all costs. Maybe this can give you an idea on how to improve it: http://www.sqlservercentral.com/articles/T-SQL/91724/

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: writing queries that easily readable

    GilaMonster (12/2/2015)


    We can compensate for badly written code with more badly written code. Excellent plan.

    Correctly terminate all statements with a semicolon (they're statement terminators). The end.

    If someone did not...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: writing queries that easily readable

    xsevensinzx (12/2/2015)


    GilaMonster (12/2/2015)


    xsevensinzx (12/2/2015)


    Don't forget to put it at the beginning of each CTE too.

    !Gah !No

    .A semicolon is a statement *terminator* .It is not something that gets placed at the...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: writing queries that easily readable

    xsevensinzx (12/1/2015)


    This is what I like that everyone despises.

    Are your referring to the square brackets or the unrelated table aliases?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Use of SP_

    JustMarie (12/1/2015)


    Why not use _sp as a suffix? It still shows that the code is a stored procedure and lets you group things by name much more easily.

    I've advocated...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: writing queries that easily readable

    I agree on having a team standard for code formatting. However, if you want examples, here's one that I created some time ago. One image is described and the other...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Query processor could not produce a query plan because of the hints defined in this query.

    You shouldn't use an index hint to be sure that the index is being used. If it's useful, it should be used automatically. If it's not used, maybe the query...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Query processor could not produce a query plan because of the hints defined in this query.

    Do you really need the hints? Do you understand the problems of NOLOCK? Why do you need to specify the index? Wouldn't the query processor use it? Why not?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Large differences between estimated and actual row counts but stats are OK

    Check this article for better (or actual) help:

    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Using CROSS APPLY instead of sub queries.

    You have 2 options. One is exactly the same as the query that you have, and the other one will bring additional rows. I won't tell you which is which...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: SQL help I'm a noob

    zicado (11/30/2015)


    I still don't understand (SELECT AVG(VALUE_COMISS) FROM

    COMISSION WHERE JOB.ID = COMISSION.ID)...Could someone explain this to a noob??

    It's called a correlated subquery. Basically, for each ID in the JOB table...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 3,691 through 3,705 (of 8,731 total)