Forum Replies Created

Viewing 15 posts - 3,736 through 3,750 (of 7,609 total)

  • RE: The order of TRUNCATE and DROP / DISABLE NONCLUSTERED INDEXES

    I'd say you get a slight gain by disabling the non-clus indexes first.  That's because disabling the index requires removing the rows, which requires some minor logging (of page deallocations,...

  • RE: Get the year and Qtr

    Jeff Moden - Saturday, September 23, 2017 8:24 PM

    Ah... almost forgot.  Neither Scott's nor mine checks to make sure the values of...

  • RE: Get the year and Qtr

    Or just:


    SELECT LEFT(OrigDateString, 4) + ' Q' + CAST((CAST(SUBSTRING(OrigDateString, 6, 2) AS tinyint) + 2) / 3 AS varchar(1))
    FROM #TestData

  • RE: Column Length

    Columns lengths have another effect on memory allocation as well.  SQL reserves memory prior to processing a table.  It determines the amount of memory to reserve partly based on column...

  • RE: Mortgage amortization table

    Jason A. Long - Thursday, September 21, 2017 8:30 AM

    Jeff Moden - Thursday, September 21, 2017 7:10...

  • RE: Speeding up OBJECTPROPERTY...

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

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

  • RE: Sql Help

    Or:

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

  • RE: Speeding up OBJECTPROPERTY...

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

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

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

  • 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 ,

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

  • RE: Mortgage amortization table

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

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

  • RE: Mortgage amortization table

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

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

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

Viewing 15 posts - 3,736 through 3,750 (of 7,609 total)