Forum Replies Created

Viewing 15 posts - 1 through 15 (of 670 total)

  • Reply To: calculation for year month and quarter with date dimension table

    Without sample data and DDL, it's hard to help, but I would look here.  It is only bringing back where the dtDate = enddate

     

    INNER JOIN tblDate WITH (NOLOCK) ON tblDate.dtDate...

    For better, quicker answers, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Reply To: SQL Tables Not Updating After Inserting New Rows

    In the first link, if you go to step 16, you'll see where they are calling the procedure you have been referencing to update the watermark table.  Essentially, they are...

    For better, quicker answers, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Reply To: Select * (-----)

    DDL, Sample Data and expected results will help us help you

    For better, quicker answers, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Reply To: SQL Tables Not Updating After Inserting New Rows

    I created your table [watermarktable] and then created your stored procedure dbo.usp_write_watermark and then executed your stored proc with the script that I provided.  I don't know what you did...

    • This reply was modified 3 years, 9 months ago by Mike01.

    For better, quicker answers, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Reply To: SQL Tables Not Updating After Inserting New Rows

    I ran your code and it works as expected.  What happens if you run this:

     

    Select * from watermarktable where table_name = '[dbo].[products]'

    exec dbo.usp_write_watermark @LastModifiedtime = '8/17/2022', @TableName = '[dbo].[products]'

    Select *...

    For better, quicker answers, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Reply To: Best way to process a large XML file (2MB) or greater

    Instead of shoving it into an xml field, can you parse it into real table or 3?

    For better, quicker answers, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Reply To: group records by week

    The DateAdd function is failing.  The increment parameter is an int and you are passing in a bigint

    For better, quicker answers, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Reply To: Disecting SQL Code

    without any sample data, we can only tell you what we see.  App Category is coming from the label field in app_menu_filters and Menu is coming from the label field...

    For better, quicker answers, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Reply To: Help with query

    Depends on how big the data set is, but you could use string_split

     

     

    ;with cte as (
    Select c.ID, c.name, ltrim(rtrim(s.value)) as word, c.KeyWords
    from #Companies c
    Cross apply
    string_split(KeyWords, ',')...

    • This reply was modified 4 years, 4 months ago by Mike01.

    For better, quicker answers, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Viewing 15 posts - 1 through 15 (of 670 total)