Forum Discussion
How do I split a column according to another column?
where did the duplicates come from and the values don't match the original data (Config RecID 111 should be 1 for renewal term and the Est Renew $ should be blank.)
Hi Anonymous ,
My first step was to Pivot the data.
After pivoting I got nulls. ( looking at your post seems like you ghad already achieved this step)
I tried to fill the nulls value by using the fill up option. I did this because I dont want any other data to be missed.
May be I misunderstood your requirements.
For the given sample data how would you want your output to look like? this will provide me enough insights.
Thanks,
Tejaswi
- Anonymous7 years agoNot applicable
I need the output to look like this but with correct values
- Anonymous7 years agoNot applicable
Hi Anonymous ,
It still looks unclear to me.
Looking at your output seems like you are missing bunch of other data too.( not sure)
I would also love to see the solutions. So tagging the experts @v-lili6-msft, @v-xuding-msft,@v-cherch-msft
Thanks,
Tejaswi
- Anonymous7 years agoNot applicable
Yes data is missing, that was merely a visual representation on what I need the table to look like. Essentially I just need those 3 columns with the appropriate data. I believe I need to create a native query selecting that table but I am a novice with SQL syntax. This is what I wrote end of day yesterday but I am returning an error that states "Microsoft SQL: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=,...."
Code:
Select Config_RecID
, (select User_Defined_field_Value AS 'Est. Renew $'
FROM v_rpt_ConfigCustomFields
WHERE User_Defined_Field_RecID in (4))
, (select User_Defined_field_Value AS 'Renewal Term'
FROM v_rpt_ConfigCustomFields
WHERE User_Defined_Field_RecID in (5))
FROM v_rpt_ConfigCustomFields