Forum Replies Created

Viewing 15 posts - 76 through 90 (of 114 total)

  • RE: FK selection (an nvarchar(30) column or four int columns)

    Of course the best answer you'll get is "It Depends..." but anyway, How is the table indexed? If the default indexing (clustered on all four ints) is used,...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: Why 'ALTER INDEX REBUILD' didn't change 'avg_fragmentation_in_percent' returned from sys.dm_db_index_physical_stats?

    Yes, you do:

    http://msdn.microsoft.com/en-US/library/ms188388%28v=SQL.90%29.aspx

    You've explicitly set the fill factor to 80% which means that the database engine will leave 20% of the pages empty (this is a good thing, generally because...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: T-SQL - some HELP

    Also, you probably don't want those two nested if statements. (unless you do...)

    The way you have it now, if there's a intake scheduled for 5:45, and another scheduled for 3:11...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: NULL

    Hugo, 5+the number of your children is obviously 7... I think maybe you messed up your inner select 🙂

    I think that this does illustrate a point that has not...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: ANSI_NULLS

    When I first came to use SQL, I was flabbergasted that anyone could think it wise to design a system where x=y could be false and x <> y could...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: Primary Keys

    regarding when the non-clustered pk might be good, the oversimplification is that if you do a lot of updates, you probably want the table clustered on the PK, because you...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: Primary Keys

    A little bit of a different viewpoint: Most people have focused on the clustered vs nonclustered aspect of the question, but when I first read it, I thought the...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: SARGability question

    Thanks for looking at this,

    That's an interesting suggestion about the statistics on the tvf, I just assumed that because the query plan looked like the problem was with SARGability, that...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: Is sort order important in index?

    They have identical costs in the query plan.



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: SSRS Parameterization

    On your hidden parameter copy the expression from the default value section, and also put it in the available values section. (you need it in both places)

    In ssrs 2005,...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: SSRS Parameterization

    I didn't take a look at your attachment, but I think, if I remember from a long time ago, what you want to do is put the default value in...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: Is sort order important in index?

    So this has me confused, as it goes contrary to what I've previously read and experienced.

    As a quick test I ran a select * against a clustered table, ordered both...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: Help! Can I get it back?

    This is what you were looking for:

    http://www.sqlservercentral.com/articles/Backup+and+Recovery/restoringtoapointintime/1905/

    As an aside though, the begin/end statements are just another statement in the stored proc; Anything after the end is included in the text,...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: SQL 2005 Table Valued Functions

    Not quite clear on the nature of your question. Are you wondering technically how to do it or how should you do it?

    The method for creating optional parameters in...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

  • RE: how to create a conditional Alter Statement

    No problem, glad I could help.

    You should probably move the update statement inside the try block. If there is an error that will be caught by the try (for...



    Dan Guzman - Not the MVP (7/22/2010)
    All questions have to be prefaced by Server version and 'according to MS Docs' or 'my own personal opinion based on how much detail I felt like digging into at the time.'

Viewing 15 posts - 76 through 90 (of 114 total)