Forum Replies Created

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

  • RE: UTC date from an integer

    Looks to me like they used 1904 as the base year rather than 1970. That would be quite logical if they needed to show dates before 1970, such 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: How to return user-defined row when a record doesn't exists

    Easiest might be to add a UNION [ALL] with a "NOT EXISTS" clause. Btw, I don't see any reason to do UNION rather than UNION ALL so I've used...

    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: Determiine if 3 most recent job executions have failed

    I think you need to order run_date DESC also, not just time:

    ORDER BY h.[run_date] DESC, h.[run_time] DESC

    Also, I don't see a need for a separate CTE_Restore_JobHistory2. You can...

    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

    chip.halsey (12/29/2014)


    Thanks for the good list of interview questions. I thought that the answer to question 15 might be 1 but I was really expecting an error. 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: Unsual DEADLOCK info

    Or, more specifically, run these commands:

    DBCC TRACEOFF ( 1204, -1 )

    DBCC TRACEON ( 1222, -1 )

    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

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

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