Forum Replies Created

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

  • Reply To: Insert if not exist

    Thanks. Understand the concept now when to use Left Join and Not Exist.

  • Reply To: Sum Pivot by Dynamic Quarter

    Hi, thanks Brian. Edit 1 is the one im looking for to sum by quarter. But the ordering are not in order. How can I order it without applying Order...

  • Reply To: insert and update

    After applying indexes, it seems faster now.

  • Reply To: insert and update

    Hi, i am using this method. but it takes longer time. i believe the columns are not index.

    More than 20 columns and more than 50k rows. It takes me more...

  • Reply To: view temp table

    it has multiple line, i am just creating it myself before applying to real data. there's logic to update certain scenarios, that is why I apply max in it. Just...

  • Reply To: view temp table

    Currently this is my code as below. As i would to create as a view, not sure on how to apply together with the update and temp table replacement.

                

    May 10, 2019 at 6:57 am

    #3639668

  • Reply To: view temp table

    How can I select all columns after updating the case condition?

     

    WITH y AS (

    SELECT

    testing1

    , testing2

    , testing3

    , amount

    FROM (VALUES(

    'testing1'

    , 'testing2'

    , 'testing3'

    , 700)

    ) z(testing1,testing2,testing3,amount)

    )

    select testing1,testing2

    ,MAX(NULLIF(updatecolumn, null)) OVER(PARTITION BY testing1) updatecolumn_New

    from(

    SELECT *

    --CASE CONDITION...

  • RE: mapping back

    drew.allen - Monday, February 25, 2019 12:24 PM

    The first one is a simple change to the query that I provided.  If...

  • RE: mapping back

    drew.allen - Friday, February 15, 2019 9:02 AM

    This runs faster on my test runs, because it only requires one scan of the...

  • RE: distinct in over partition

    saravanatn - Monday, February 18, 2019 5:00 AM

    girl_bj - Monday, February 18, 2019 1:55 AM

    create...

  • RE: margin by month or year

    pietlinden - Thursday, January 31, 2019 9:12 PM

    When I ran your query, it said it couldn't find the table...
    And you never defined...

  • RE: margin by month or year

    pietlinden - Thursday, January 31, 2019 8:56 PM

    Okay, Can you post some sample data and expected output? I'm still not clear on...

  • RE: margin by month or year

    pietlinden - Thursday, January 31, 2019 8:29 PM

    girl_bj - Thursday, January 31, 2019 6:52 PM

  • RE: margin by month or year

    girl_bj - Thursday, January 31, 2019 6:52 PM

    i would like to count margin by category.
    i have sum and group the category amount....

  • RE: Month T-1

    pietlinden - Thursday, January 10, 2019 7:05 PM

    Did you run the code to create the function? Sounds like you didn't.

    Any sample that...

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