Forum Replies Created

Viewing 15 posts - 1,066 through 1,080 (of 59,078 total)

  • Reply To: get week number of month

    Just a caution...

    The WEEK (ww) datepart is ALWAYS based on Sunday for DATEDIFF.  MS did that to ensure that the DATEDIFF(wk) functionality will be "Deterministic" so that it can be...

  • Reply To: get week number of month

    rjaye03 wrote:

    SET DATEFIRST 6 ; -- Set first Day of Week to Saturday SELECT [CreateDateTime],DATEPART(WEEK,[CreateDateTime]) - DATEPART(WEEK,CAST(CAST(YEAR([CreateDateTime]) AS VARCHAR(4))+'-' + CAST(MONTH([CreateDateTime]) AS VARCHAR(2)) + '-01' AS DATETIME))+1 AS WeekNo FROM...

  • Reply To: High tempdb usage alternatives

    anoop.mig29 wrote:

    Hi

    We have an stored procedure which runs frequently and  it contain logic in which data are first dumped in temproray table and then moved to physical table .due to...

  • Reply To: Master Data - Relational or Dimensional modeling?

    It's real simple... have them prove that the performance is better with repeatable, demonstrative code.  One good test is worth a thousand expert opinions and until they can prove it...

  • Reply To: How to speed up this?

    If you want a load into a new table, then create the empty table AND create the Clustered Index.  Then, forget SSIS... use BULK INSERT with the TABLOCK option and...

  • Reply To: Gentlest of Reminders, Don't Stop Learning

    @Grant,

    I love this article but I'd like to add a nuance to it, especially after what Rick and I were just "talking" about in some of the sayings we listed.

    A...

  • Reply To: Gentlest of Reminders, Don't Stop Learning

    skeleton567 wrote:

    Jeff Moden wrote:

    Heh... totally agreed.  It matches one of the mantra's that I carry in my signature line below...

    "Change is inevitable... Change for the better is not."

    And I'll add a...

  • Reply To: Get data from wmic/winmgmt/etc

    us26 wrote:

    Thanks for your solution! Looks awesome. The only one disadvantage is necessity to give names to columns manually. Is there any way to do it automatically? Preferably without dynamic-sql.

    [quote-0...

    Attachments:
    You must be logged in to view attached files.
  • Reply To: Gentlest of Reminders, Don't Stop Learning

    gregg_dn wrote:

    I don't mind changes to software etc. that actually improve the product, but so many changes these days seem to occur just to give the developers something to do. ...

  • Reply To: Partition Large Tables needed

    sqlguy80 wrote:

    Thanks for the message,

    What are the disadvantages of partitioning? does it need manual management?

    Can we fix those issues which partitioning addresses using other solutions?

    I've personally found that partitioned tables...

  • Reply To: Query goes crazy.

    I have no real idea except to say that yours isn't the first post where On-prem performance blew the doors off of cloud performance in similar tests.  You might want...

  • Reply To: Query goes crazy.

    Have you looked to see if the indexes on the table are the same?  Have you updated statistics lately on either?

  • Reply To: Weekly sales report

    Heh... apparently, the OP has left the building. 😀

  • Reply To: table with varcahar(max)

    IMHO, take the time to force the MAX to be out of row and default the error to an empty string to prevent the pointer from being "expansive".  Have max...

  • Reply To: Weekly sales report

    pietlinden wrote:

    If you're going to do lots of date-related analysis, I'd just create a Calendar table with all the columns you want to group by, and then join to that...

Viewing 15 posts - 1,066 through 1,080 (of 59,078 total)