Hi all,
I want to pass the two records present in single column into single row. here is the sample data
input table
field0 field1 field2
101 1 1000
101 2 2000
output table
field0 field1_1 field2_2
101 1000 2000
I tried for in column derivation as....
If field1=1 then field2 else 0 for field1_1
If field1=2 then field2 else 0 for field2_2
but it works for field1=1 since field0 is the key column.
your suggestions will help me to overcome this
thanks in advance
converting single column to single row
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I want to pass the two records present in single column into single row. here is the sample data
input table
field0 field1 field2
101 1 1000
101 2 2000
output table
Inlink.field0 Inlink.field1_1 Inlink.field2_2
101 1000 2000
I tried for in column derivation as....
If Inlink.field1=1 then Inlink.field2 else 0 for Outlink.field1_1
If Inlink.field1=2 then Inlink field2 else 0 for Outlink.field2_2
but it works for Inlink.field1=1 since Inlink.field0 is the key column.
your suggestions will help me to overcome this
thanks in advance
input table
field0 field1 field2
101 1 1000
101 2 2000
output table
Inlink.field0 Inlink.field1_1 Inlink.field2_2
101 1000 2000
I tried for in column derivation as....
If Inlink.field1=1 then Inlink.field2 else 0 for Outlink.field1_1
If Inlink.field1=2 then Inlink field2 else 0 for Outlink.field2_2
but it works for Inlink.field1=1 since Inlink.field0 is the key column.
your suggestions will help me to overcome this
thanks in advance
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: