Forum Replies Created

Viewing 15 posts - 1,381 through 1,395 (of 7,613 total)

  • Reply To: Error shrinking database

    You should still never shrink a database (at the db level), only specific db files (at the file/file_id level).

    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: New Index Maintenance Methods Recommended by Microsoft

    One must also consider the enormous difficulty of what the MS folks are trying to do.

    I get asked all the time about "(simple) rules for tuning indexes" since that is...

    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: Conditional Update of Column

    Or this instead?:

    ;WITH src
    AS (SELECT s.PK
    ,MAX(CASE WHEN s.ColName = 'Col1' THEN s.Value END) AS Col1Value
    ...

    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: Licensing SSIS for Developer Edition 2019

    I AM NOT A SQL LICENSING EXPERT.

    But as I understand the licensing, if you do ANY production work AT ALL on the instance, then you cannot use Developer Edition for...

    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: Get everything from last character until space

    I'd use REVERSE because it's considerably less overhead.

    SELECT BANAME, RIGHT(BANAME, CHARINDEX(' ', REVERSE(BANAME)) - 1) AS BANAME_VALUE
    FROM #sample

    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: datetime column, Day of Week with count, how to add month/yr grouping

    Personally I think I'd rather see the days as columns in the same row, i.e. a column for Monday, a column for Tuesday, etc.., with one per month and one...

    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: datetime column, Day of Week with count, how to add month/yr grouping

    Thanks for the test data!  Sorry if I seemed difficult, but I help on up to dozens qs a day, and I just don't have to do data prep for...

    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: error when using date column with remote oracle table

    By default, I think Oracle timestamp only has 6 digit precision for sub-seconds (FULL DISCLOSURE: I haven't been an Oracle DBA since Oracle 8).  Try cutting the sub-seconds from 7...

    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: datetime column, Day of Week with count, how to add month/yr grouping

    Hmm, decent start, but I can't query against it.

    I need an actual INSERT statement, that works, like this:

    CREATE TABLE #data ( customer int NOT NULL, myDateTime datetime NULL );

    INSERT INTO...

    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: Table Size out of control..

    ScottPletcher wrote:

    Budd wrote:

    Phil - Correct.  Devs want it all in dev.

    Ken - AWESOME  "INSTEAD OF"  Why didn't I think of that.  Is a trigger to delete  ##  history table records...

    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: Table Size out of control..

    Budd wrote:

    Phil - Correct.  Devs want it all in dev.

    Ken - AWESOME  "INSTEAD OF"  Why didn't I think of that.  Is a trigger to delete  ##  history table records WHEN...

    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: datetime column, Day of Week with count, how to add month/yr grouping

    That's from the ROLLUP.

    The one with NULL, NULL is the global dayname total, so all Mondays, Tuesdays, etc., regardless of year, month.

    The one with NULL, YEAR is supposed to 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".

  • Reply To: SQL Server Agent Jobs are not logging history

    Well, you fixed it, but glad I helped in some way :-).

    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: SQL Server Agent Jobs are not logging history

    Is your msdb data or log file full?

    Do you see any errors in the SQL error log that could be related to the issue?

    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: Table Size out of control..

    Agree with Ken.  Use a trigger to only write the data you want in the table to begin with.

    The only thing Ken left out was a:

    SET NOCOUNT ON

    at the start...

    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 - 1,381 through 1,395 (of 7,613 total)