Forum Replies Created

Viewing 15 posts - 826 through 840 (of 7,613 total)

  • Reply To: Tables with constant data

    REORGANIZE first.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Index with included columns

    (1) If the query is fetching only columns that are part of the index, SQL will not need to access the main table at all and will just use the index. ...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: I am trying to normalize this table but I am not sure if I'm on the right track

    Excellent job!  Looks much better than mine too!!

    Some minor adjustments:

    The PK for Ticket Response is ( Ticket Number, Ticket Response ID ) (in that order).  Yes, a PK can have...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Index with included columns

    If I modify the non key index [TransactionGuid] to include [TransactionId] as an included column on the non-clustered index.

    No.  Column TransactionId is automatically included in every nonclustered index (including the...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: I am trying to normalize this table but I am not sure if I'm on the right track

    More general notes:

    (11) The attributes within an entity should apply only to that entity.  For example, CPZ should be in the Ticket entity only if it CPZ relates directly to...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: I am trying to normalize this table but I am not sure if I'm on the right track

    Here's my initial cut at assigning Attributes to Entities.  I tend to fully normalize, but you can back off of that later if you want to (in technical terms, we...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: I am trying to normalize this table but I am not sure if I'm on the right track

    OK, with that out of the way, what Entities do we have for this model?  We must be able to assign each Attribute to an Entity.  I'll make the Entity...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: I am trying to normalize this table but I am not sure if I'm on the right track

    Rules for normalization:

    (1) Write names in normal language, no "camel case" naming, etc.

    (2) Decide whether you want to use singular or plural names for Entities (there is lots of disagreement...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: I am trying to normalize this table but I am not sure if I'm on the right track

    ratbak wrote:

    Not a part of normalization, but I'd recommend you not use spaces in object names -- it will force the use of brackets or double quotes around those names. ...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: I am trying to normalize this table but I am not sure if I'm on the right track

    I've had decades of experience doing data modeling, but I have no clue for your tables.  You haven't described any of the data.

    Normalization deals with a logical design, containing "entities"...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: SPLA License question

    Agree 100%.  Talk to the vendor who sold you the license or talk to MS directly.  Licensing is much more complicated now than in the past, so talk to an...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Restore stalls around 97% done with PREEMPTIVE_OS_WRITEFILEGATHER

    And make sure it is the log file.  That is, make sure IFI is enabled so that SQL doesn't have to initialize all the data files too.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: how to troubleshoot slow running stored proc

    wrote:

    Focus first on logical I/Os, as that's usually the culprit one way or another.

    You just re-stated exactly the first line of what I wrote in an earlier post.  What...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: aggregate by a given period

    I think something like this will do.  And you can change the "INNER JOIN" to "LEFT OUTER JOIN" if you want to show all times ranges for every Q and...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • Reply To: Convert Varchar data type to Datetime or Timestamp

    SELECT Convert(datetime, Left(dr_value, 10), 101) as Converted_Date from dr_tracking ;

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 15 posts - 826 through 840 (of 7,613 total)