Forum Replies Created

Viewing 15 posts - 196 through 210 (of 4,087 total)

  • Reply To: Replace calendar table multiplier column with date logic

    Thanks for the improvement Jeff.  I was thinking about that after I posted and realized that it would limit it to just a year.  The mod that I was going...

  • Reply To: Replace calendar table multiplier column with date logic

    This code produces the exact same results as Steve's but runs in about half the time.

    WITH BusinessDates AS
    (
    SELECT *, COALESCE(MAX(bd.BusinessDate) OVER(PARTITION BY MONTH(c.CalDate)...

    • This reply was modified 3 years, 2 months ago by drew.allen.
  • Reply To: IIF statement query using SQL server

    I would use DATEADD() instead.   DATEDIFF() and DATEPART() use boundaries instead of full periods.

    WHERE wk.appl_createddate <= DATEADD(wk,4,wk.appl_conversiondate)
    AND wk.appl_conversiondate <= appl_createddate /* This may...
  • Reply To: Joining large tables to small tables.

    satyanarayana09 wrote:

    Whenever you do a left join a small table and a large table make sure that large table is defined first in the join query. In your case the...

  • Reply To: SQL Query Question

    It looks like a packing interval problem.

    Drew

  • Viewing 15 posts - 196 through 210 (of 4,087 total)