Forum Replies Created

Viewing 15 posts - 16 through 30 (of 285 total)

  • Reply To: SQL pivot /unpivot

    I just provided two loans but if i take 1000 loans, i do not want same value for status1 , status 2 . instead i want to get different status...

  • Reply To: SQL pivot /unpivot

    SELECT ls.LOANNUMBER
    ,Status1 = MAX(COALESCE(
    NULLIF(ls.CLOSED, '')
    ,NULLIF(ls.Pending_Transfer, '')
    ,NULLIF(ls.REO, '')
    ,NULLIF(ls.Foreclosure, '')
    )
    )
    ,Status2 = MAX(COALESCE(
    NULLIF(ls.CLOSED, '')
    ,NULLIF(ls.Pending_Transfer, '')
    ,NULLIF(ls.REO, '')
    ,NULLIF(ls.Foreclosure, '')
    )
    )
    FROM #LoanStatus ls
    GROUP BY ls.LOANNUMBER;
  • Reply To: SQL pivot /unpivot

    Your code works , if you place the columns as you want to see result ( as example i provided) , but if i place all the columns in same...

  • Reply To: SQL pivot /unpivot

    CREATE TABLE #LoanStatus

    (

    LOANNUMBER INT

    ,CLOSED Varchar(200)

    ,Pending_Transfer Varchar(200)

    ,REO Varchar(200)

    ,Foreclosure Varchar(200)

    )

    INSERT INTO #LoanStatus ( LOANNUMBER, CLOSED ,Pending_Transfer,REO,Foreclosure ) VALUES (12345,'','Pending_Transfer','','Foreclosure')

    INSERT INTO #LoanStatus ( LOANNUMBER, CLOSED ,Pending_Transfer,REO,Foreclosure ) VALUES (12678,'Closed','Pending_Transfer','','')

  • Reply To: Retire Old steps in a table

    JUST FYI. This sql  was just  an example i provided to explain others , who is indeed trying to help me. I am not really at this moment concentrating on...

    • This reply was modified 5 years, 7 months ago by  komal145.
    • This reply was modified 5 years, 7 months ago by  komal145.
  • Reply To: Retire Old steps in a table

    just FYI. I just edited my post with the dates and tried to explain more about the "Expirationdate" computed column. I dont know why i cannot see my reply to...

  • Reply To: Retire Old steps in a table

    This was removed by the editor as SPAM

  • Reply To: Retire Old steps in a table

    This was removed by the editor as SPAM

  • Reply To: Retire Old steps in a table

    sometimes two or more steps come into table on same day. As we load data from files. So the above query does not work. 🙁

  • Reply To: Interview question

    Lynn- My view is the same as yours. But question was if i have the package with such three different dataflow tasks , how you design it to schedule. I...

  • RE: Passing datatime , int variables into a table through execute sql task in SSIS

    Thom A - Wednesday, March 13, 2019 3:07 PM

    Steve seems to be on the money here. The error is telling you to...

  • RE: Tsql query

    komal145 - Thursday, September 20, 2018 8:59 AM

    I have a loan that is modified several times on several dates. I need to...

  • RE: SQL help with date comaprisons

    andycadley - Monday, August 6, 2018 3:48 PM

    I think that'll do it:

    WITH C1 AS
    (
     --SELECT *, MAX(ISNULL(HoldEndDate, '9999-12-31')) OVER(PARTITION BY LoanNumber...

  • RE: SQL help with date comaprisons

    Lynn Pettis - Monday, August 6, 2018 1:55 PM

    komal145 - Monday, August 6, 2018 1:41 PM

    August 6, 2018 at 2:42 pm

    #2000509

  • RE: SQL help with date comaprisons

    andycadley - Monday, August 6, 2018 1:56 PM

    komal145 - Monday, August 6, 2018 1:41 PM

Viewing 15 posts - 16 through 30 (of 285 total)