Forum Replies Created

Viewing 15 posts - 5,506 through 5,520 (of 7,619 total)

  • RE: how to rewrite query to avoid duplicate records (across columns)

    Eirikur Eiriksson (1/6/2015)


    ScottPletcher (1/6/2015)


    Jeff Moden (1/4/2015)


    asita (1/3/2015)


    Nolock is ignore the locks (please ignore it)

    Trust me Dhani, we know what it does and folks in-the-know can't just ignore it. It'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: How to hide/disable the menus New Database, Restore Database in SQL Server Management Studio

    I agree, NEVER use the GUIs for backups and restores. For one thing, you have no record of what was done, whereas a script can be enhanced over time.

    I...

    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: Statistics hasn't been updated

    For a table that size, and esp. one that apparently static, I'd make sure the statistics were based on the entire table rather than just a small sampling.

    You can see...

    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 to rewrite query to avoid duplicate records (across columns)

    Jeff Moden (1/4/2015)


    asita (1/3/2015)


    Nolock is ignore the locks (please ignore it)

    Trust me Dhani, we know what it does and folks in-the-know can't just ignore it. It's normally a bad...

    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 Columns of Months into Columns of Weeks

    ------------------------------------------------------------------------------------------------------------------------

    --declare temp tables and variables

    IF OBJECT_ID('tempdb.dbo.#sql') IS NOT NULL

    DROP TABLE #sql

    CREATE TABLE #sql (

    ident int IDENTITY(1, 1) NOT NULL,

    ...

    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 Columns of Months into Columns of Weeks

    I'd probably generate dynamic SQL in this case, as it's much clearer to me. Sample below. I'm sure it will need tweaked but it should give you enough...

    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: Wow!!! I didn't know that could be done - Datetime Calculations

    GilaMonster (12/31/2014)


    Luis Cazares (12/30/2014)


    Yes, it's possible, but I wouldn't advice on using decimals on calculations as it's easy to get it wrong.

    It's also far less clear than a DATEADD 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".

  • RE: NEED COLUMN NAMES FROM TABLE DYNAMICALLY

    CELKO (12/30/2014)

    Besides begin better than anything you can write, the vendor will maintain it and the vendor will be legally responsible if anything goes wrong.

    Bull! I'm telling you, don't...

    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: Wow!!! I didn't know that could be done - Datetime Calculations

    Jeff Moden (12/30/2014)

    What a lot of folks also miss is that you can add and subtract formatted times as constants instead of jumping through multiple datepart hoops, as well.

    ...

    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 to see write matrix on on storage?

    sgmunson (12/30/2014)


    You didn't mention what technology "DAS" is, but I have to assume that since local disk is faster, that it's probably a SAN. Are you good 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: Provider Parameters MSDASQL - HELP

    Don't believe there is a command/query that can see that directly from SQL Server.

    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: Convert datetime to bigint

    Charles Kincaid (12/22/2014)

    The only other reason that I can see for something like this is since the Datetime format uses a singed integer for the date portion that there might...

    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: Help me find the best index for a specific query

    _simon_ (12/30/2014)


    @ScottPletcher - I tried it now and it seems that both clustered and nonclustered indexes are running for about the same time.

    Keep in mind that using the clustered 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".

  • RE: Unsual DEADLOCK info

    Btw, either add 1222 setting directly to the start-up flags or add it to a start-up proc. Otherwise you'll lose that flag setting when SQL stops and restarts.

    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: 15 Quick Short Interview Questions Useful When Hiring SQL Developers

    Jeff Moden (12/29/2014)


    Phil Factor (12/29/2014)


    We use only the 2 part name and let the synonyms do the rest of the work. Do you know of a way to do 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".

Viewing 15 posts - 5,506 through 5,520 (of 7,619 total)