Viewing 15 posts - 16 through 30 (of 285 total)
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...
June 19, 2019 at 8:44 pm
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;
June 19, 2019 at 8:26 pm
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...
June 19, 2019 at 8:24 pm
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','','')
June 19, 2019 at 6:33 pm
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...
May 8, 2019 at 6:07 pm
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...
May 8, 2019 at 4:32 pm
sometimes two or more steps come into table on same day. As we load data from files. So the above query does not work. 🙁
May 8, 2019 at 2:19 pm
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...
April 19, 2019 at 7:58 pm
March 14, 2019 at 8:06 am
September 20, 2018 at 10:14 am
August 8, 2018 at 12:13 pm
August 6, 2018 at 2:41 pm
Viewing 15 posts - 16 through 30 (of 285 total)