Forum Replies Created

Viewing 15 posts - 5,521 through 5,535 (of 7,614 total)

  • RE: Help me find the best index for a specific query

    You should make it a clustered index. You should also explicitly specify the appropriate FILLFACTOR and filegroup (even if it's PRIMARY, as that may not be the current default...

    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 avoid Union/Union All?

    A FULL OUTER JOIN should handle this rather easily. From what you stated, a FOJ should be available to you.

    SELECT ca1.Cust_id, ca1.Rec_id, ca1.Rec_type, ca1.Update_TS

    FROM quote_table q

    FULL OUTER JOIN sell_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: Getting back to SQL Server

    Agreed, Developer's Edition is a wonderful, and very cheap considering, product for what you're talking about.

    Also, get a good book on SQL Server 2008 (or later) Administration. Kalen Delaney'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: Date Table

    Jeff Moden (12/26/2014)


    Thanks, Scott. I was afraid it would be something like that. I can see those reasons for companies back when spreadsheets where 11x17 accounting papers that...

    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 : Change to Capture

    I don't understand the point of:

    "PARTITION BY (SELECT NULL)"

    in the LAG. Why not just leave out "PARTITION BY"?

    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: Writing views with if else

    SELECT a.id,

    CASE WHEN match_found.address_id IS NULL THEN '' ELSE address1 END AS address1,

    CASE WHEN match_found.address_id IS NULL THEN '' ELSE address2 END...

    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: Space Problems

    To be sure, make SQL update the page (and row) usage counts and see if there are any large discrepancies:

    DBCC UPDATEUSAGE ( '<your_db_name>' )

    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: Date Table

    Jeff Moden (12/25/2014)


    CELKO (12/25/2014)


    Why do some companies use weird Fiscal Years, such as starting in April? What is the purpose there?

    The last time I looked the GAAP had...

    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/25/2014)


    ScottPletcher (12/25/2014)


    Geoff A (3/3/2013)


    Jeff Moden (2/28/2013)


    Shifting gears a bit, I’m glad that these are essay-style questions so that I could write in what I believe is a more...

    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

    Geoff A (3/3/2013)


    Jeff Moden (2/28/2013)


    Shifting gears a bit, I’m glad that these are essay-style questions so that I could write in what I believe is a more correct answer 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: 15 Quick Short Interview Questions Useful When Hiring SQL Developers

    Excellent! Best overall set of SQL developer interview qs I've ever seen.

    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: Date Table

    I think this is a much simpler method:

    DECLARE @first_fiscal_year smallint

    DECLARE @number_of_years tinyint

    SET @first_fiscal_year = 2014

    SET @number_of_years = 10

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

    DECLARE @fiscal_years TABLE (

    year smallint PRIMARY KEY,

    ...

    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: Unused Procedure lists - Most easiest way

    Keep in mind that procs are listed only as long as they are in the cache. On a memory-constrained or busy server, stats could be lost/removed. Also, whenever...

    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: Date column with 1900-01-01 value

    gissah (12/23/2014)


    Thanks that is what I ended up doing with a subquery.

    select pt.projinvoiceprojid,MIN(CAST(pt.PROJECTEDSTARTDATE AS DATE)) AS 'SOPOrderDate_ProjectStartDate'

    from projtable pt

    where pt.PROJECTEDSTARTDATE !='1900-01-01'

    group by pt.projinvoiceprojid

    order by pt.projinvoiceprojid

    Be careful! Do...

    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: Killing all sessions and restoring the database

    Markus (12/23/2014)


    They way I do my refresh db jobs is the first step of the job is the kill step, second step is restore. They happen back to back...

    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,521 through 5,535 (of 7,614 total)