Forum Replies Created

Viewing 15 posts - 6,886 through 6,900 (of 7,619 total)

  • RE: Computed column with/with out PERSISTED

    SQL* (1/23/2013)

    What is the need of computed column if we can do the same thing in the query/application?

    The two big advantages of computed columns are:

    1) a consistent definition;

    2) defined in...

    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".

  • RE: Computed column with/with out PERSISTED

    Lowell (1/24/2013)


    i thought it was clear: i read it as howard saying there is no need to mark an calculated column as persisted in order to index it...it's not a...

    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".

  • RE: Killed clustered index creation, running out of space

    An extraordinarily large table (which I'll abbreviate "xlt" for convenience) can indeed cause unusual issues.

    If you use tempdb, it needs (lots of) extra disk space, which basically can't be freed...

    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".

  • RE: Subtracting specific dates from today

    Steven Willis (1/24/2013)To prevent unexpected errors, you should validate your dates. And the ISDATE function is not a reliable method for such validation.

    ISDATE() is reliable for what it claims 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".

  • RE: Killed clustered index creation, running out of space

    Marius.D (1/24/2013)


    TempDB seems to be always full, maybe I'll reboot first.. thanks!

    Then you've got a second issue that needs addressed! 🙂

    Increase the size of tempdb until you have "slack" except...

    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".

  • RE: Computed column with/with out PERSISTED

    HowardW (1/24/2013)


    ScottPletcher (1/24/2013)


    HowardW (1/24/2013)


    ScottPletcher (1/24/2013)


    HowardW (1/24/2013)


    There's no need to make the column persisted prior to indexing it.

    That's not necessarily always true. You might persist a column if its...

    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".

  • RE: Computed column with/with out PERSISTED

    HowardW (1/24/2013)


    ScottPletcher (1/24/2013)


    HowardW (1/24/2013)


    There's no need to make the column persisted prior to indexing it.

    That's not necessarily always true. You might persist a column if its requires significant...

    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".

  • RE: Group By Inside CASE Statement

    You can use CASE w/i a GROUP BY.

    You can also use CASE w/i a SUM to control which values get aggregated. For example:

    SELECT

    a, b,

    ...

    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".

  • RE: Computed column with/with out PERSISTED

    HowardW (1/24/2013)


    SQL* (1/23/2013)


    Hi All,

    While reading about Computed column if found that if we mentioned PERSISTED Key word while creating/altering table then we can create index. But i'm able to create...

    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".

  • RE: SQL Index Help..

    IF and only if ABC.COLUMN2 is a (very) large column, and ABC.COLUMN1 is used by itself a lot, it might be worthwhile to keep both indexes.

    You should also review sys.dm_db_index_usage_stats...

    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".

  • RE: where fldValue=123 vs join to table with one row

    You need to get rid of the massive GROUP BY; you should be able to do the SUM() in a subquery rather than the main query, but I can't be...

    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".

  • RE: How Can I know calling procedure origin?

    AFAIK there's no any accurate way to do that.

    I guess IF every caller used a different login or sql user, you could tell from that, but overall I think that's...

    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".

  • RE: Indexed Views - why don't they improve performance?!!!!

    First, I assume you've all met all the oodles of restrictions for an indexed view; you might want to verify that using Books Online "CREATE INDEX", "Remarks", "Indexed Views" as...

    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".

  • RE: No Wildcards Characters

    declare @search_pattern_should_be varchar(100)

    set @search_pattern_should_be = '%[[][[][%] SQL Server [%]]]%'

    --example

    select case when @string like '%[[][[][%] SQL Server [%]]]%'

    then'Matched' else 'No...

    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".

  • RE: Get distinct value

    I think EXISTS would be the clearest indication that you just want to know if a matching row exists, not retrieve data from that row. For example:

    SELECT

    ...

    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 - 6,886 through 6,900 (of 7,619 total)