01-08-2013 03:54 AM
Working in an SQL Join transformation in DI Studio, I need an expression which says that "All fields in this column should have the same value as the field where Current=1".
Only the rows with Current=1 has "disability_flag" filled out, and I need to copy it to those with Current=0.
In example, this input table:
Should become this output table:
For some reason I can't think of what expression to use. I'd appreciate any advice, thanks.
01-08-2013 05:03 AM
Thanks Linus. I know how to join tables to themselves if I can drag-and-drop them from the folders menu into the SQL Join "Create" window, but in this case the input table is a previous SQL Join. How can I make a copy of it in the DI Studio SQL Join Create window?
I had hoped to resolve the problem another way. So far I've been grouping by the PK and used expressions to select for example the min(ValidFrom_DTTM) and max(ValidTo_DTTM) to combine 2-3 rows into one. My aim is that the combined row should have the most updated/current disability_flag value.
Need further help from the community? Please ask a new question.