Forum Replies Created

Viewing 15 posts - 6,271 through 6,285 (of 7,619 total)

  • RE: Query performance in Management Studio vs. Task Scheduler

    My guess would be that somehow task schedule is using a batch size of 1 row (or some very small number of rows). See if you can change 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".

  • RE: Fastest way to compare rows in Trigger for audit trail

    I'm not sure what you mean about procs and CDC.

    CDC uses the SQL log to get changes, so it shouldn't require use of procs, or even know how any change...

    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: t-sql key on a table

    Jeff Moden (1/6/2014)


    ScottPletcher (1/6/2014)


    Actually, it is a terrible idea to add an identity to this table.

    Depending on your specific data, future inserts could be sequential anyway. Even if not,...

    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: t-sql key on a table

    Actually, it is a terrible idea to add an identity to this table.

    Depending on your specific data, future inserts could be sequential anyway. Even if not, rows are inserted...

    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: t-sql key on a table

    Identity is a terrible idea on that table. Use the existing columns, in whichever order best matches your use of the table: either ( Item, ItemNumber ) or (...

    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: Insert dates into table in the giving range.

    Jeff Moden (1/1/2014)


    fahey.jonathan (12/12/2013)


    If you don't want to create a Tally table, you can use sys.columns instead and create a tally number in memory. According to my research, this...

    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: Unable to convert character to datetime

    Rando (1/2/2014)


    Still searching for a solution. Scott's solution yield's syntax errors and Chris' solution yields the entire date field...

    Again, I'm just looking for the results to be the following;

    Date: 12/30/2013

    Time:...

    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: Unable to convert character to datetime

    SELECT

    CONVERT(varchar(10), CAST(CounterDateTime AS datetime), 101) AS Date,

    RIGHT(CONVERT(varchar(20), CAST(CounterDateTime AS datetime), 100), 7) AS Time

    FROM table

    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: Split a variable length string without using a WHILE loop

    Jeff Moden (12/24/2013)


    ScottPletcher (12/24/2013)


    If you don't have any data longer than 24 bytes (or so), it might be easier just to "brute STUFF" it:

    Awesome! I don't believe anything will...

    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: Split a variable length string without using a WHILE loop

    If you don't have any data longer than 24 bytes (or so), it might be easier just to "brute STUFF" it:

    WITH SampleData (MyStr) AS

    (

    SELECT '12345678'

    ...

    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: SYNTAX Help please...

    Jeff Moden (12/20/2013)


    ScottPletcher (12/20/2013)


    Evil Kraig F (12/20/2013)


    ScottPletcher (12/20/2013)


    Admittedly the gain is much clearer when the clustering key is the ISNULLed column. So, let's just flip the clustering keys on...

    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: SYNTAX Help please...

    Evil Kraig F (12/20/2013)


    ScottPletcher (12/20/2013)


    Admittedly the gain is much clearer when the clustering key is the ISNULLed column. So, let's just flip the clustering keys on your original table...

    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: SYNTAX Help please...

    Evil Kraig F (12/20/2013)


    ScottPletcher (12/20/2013)


    Admittedly the gain is much clearer when the clustering key is the ISNULLed column. So, let's just flip the clustering keys on your original table...

    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: SYNTAX Help please...

    Evil Kraig F (12/20/2013)But, I'd like to bring us back to the origination of this minor alteration in the direction of this topic, and that's SARGability and effeciency and if...

    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: SYNTAX Help please...

    Evil Kraig F (12/20/2013)

    ScottPletcher (12/20/2013)


    There could be great harm in it if either (1) SQL could have done seeks on both terms and produced the final output more efficiently than...

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