Hello
I have a requirement as below
Column1 Column2
01-2009 +212.08
02-2009 +313.05
03-2009 -212.04
04-2009 +112.06
05-2009 -117.23
and my out put should be like
If column1 starts with 01on source side then i need to populate the data of column2 from source to Col1 on targtet and the reaminig fields on the target should be empty
Col1 Col2 col3 col4 col5
+212.08
If column1 starts with 02 on source side then i need to populate the data of column2 from source to Col2 on targtet and the reaminig fields on the target should be empty
Col1 Col2 col3 col4 col5
+313.05
Please help me out to acheve this
pivoting
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Output column derivations are all of the form
I'm assuming that the output columns are decimal, not string, so that "empty" would not be a vaild value, hence my use of SetNull().
Code: Select all
If InLink.Col1 = value Then value Else SetNull()
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
What I was thinking was along the lines of:
Where "Col1" and "01" change appropriately for each field to match their number.
Code: Select all
If Left(InLink.Col1,2) = '01' Then InLink.Col2 Else SetNull()
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers