Hi All,
I have the following input:
Col1 Col2
1 US
1 UK
1 HK
I want to have output with all combinations as follows:
Col1 Col2 Col3
1 US UK
1 US HK
1 UK HK
Similarly, if I have 4 rows in input then I will have 6 rows in output. Please suggest any method.
Regards,
Gaurav
Logic for combination
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Routine would be simple to attain. If you plan to use the existing stages, you need to do either do join or lookup to get a cartesian product. And using transformer, you need to eliminate the rows like US US, UK UK HK HK.
And you need to check for the previuous row values and eliminate UK US, and HK US, HK UK.
And you need to check for the previuous row values and eliminate UK US, and HK US, HK UK.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: