Forum Replies Created

Viewing 15 posts - 3,751 through 3,765 (of 7,619 total)

  • RE: Speeding up OBJECTPROPERTY...

    sgmunson - Thursday, September 21, 2017 8:12 AM

    ScottPletcher - Thursday, September 21, 2017 8:10 AM

    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: Sql Help

    Or:

    select *
    from lineitems
    where orderid in (select orderid from orders where customerid = @CustomerID)

    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: Speeding up OBJECTPROPERTY...

    I think it's very possible that o.type = 'U' would speed it up, rather than using OBJECTPROPERTY.

    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: Clustered Index Update Slow Update On Large Table

    Move the error details to a different table.  That table could be keyed by the clustering key of this table plus perhaps a sequential error number.

    This table should...

    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: Which is GOOD/BETTER out of two ways of writing a query ??

    There's a fundamental difference between those queries.
    The first is an INNER join to dept, obviously, as explicitly stated, whereas the second is a LEFT OUTER JOIN, although only implicitly.

    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: Concatenate sp_MSForeachdb results


    IF OBJECT_ID('tempdb.dbo.#index_info') IS NOT NULL
        DROP TABLE #index_info;

    SELECT TOP (0)
    dbschemas.[name] AS schema_name,db_name() AS db_name,
    dbtables.[name] AS table_name ,
    dbindexes.[name] AS index_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: Mortgage amortization table

    Along similar lines, I've noticed that many brokerage firms use decimal places for fractional stock holdings, although they display only 3 or 4.  Thus, it's often impossible to get an...

    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: Mortgage amortization table

    sgmunson - Monday, September 18, 2017 10:51 AM

    ScottPletcher - Monday, September 18, 2017 10:00 AM

    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: Mortgage amortization table

    TomThomson - Monday, September 18, 2017 10:52 AM

    ScottPletcher - Monday, September 18, 2017 10:00 AM

    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: Mortgage amortization table

    I don't think this is really an issue, as a practical matter.  Interest is computed daily, down to the cent (or, worst case, to hundredths of cents), how much the interest 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".

  • RE: Fill Factor on Clustered Index

    UPDATEs can indeed cause page splits, in particular if lengthening the value of a varchar column, which is quite common.  Often the resulting potential page split issues get overlooked in 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: Temporal tables and table triggers

    Yes.  Set a control value using sp_set_session_context; you can test it inside the trigger using SESSION_CONTEXT.

    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 Causing Problem

    As an aside, I suggest you use >= and < for all date/time/datetime comparisons rather than between.  That also gets rid of the need for the "tricky" use of -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: Creating a table from existing table.


    SET IDENTITY_INSERT [Marketo].[EmailActivity_Temp] ON;
    INSERT INTO [Marketo].[EmailActivity_Temp] (
      [id], [leadId], [activityTypeId], [primaryAttributeValueId], [activityDate],
      [DateAdded], [ProcessedInd], [primaryAttributeValue], [CampaignID], [EmailActivityKey],
      [NextPageToken], [LinkClicked], [ProgramName], [Attribute], [AssetName]
     ...

    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: best data modeling tool

    Erwin is a great modeling tool, the best I've used, although it wasn't cheap the last time I was able to use it.

    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 - 3,751 through 3,765 (of 7,619 total)