I am writing a logic in the Transformer.This logic gives me the expected results. But my Performance goes down with this logic in the transformer.Please help me in writing a better logic than this.
if col1= '8000' OR col1 ='8100' OR col1 ='8300' OR col1='8301' OR col1='8302' OR col1='8400'
OR col1='8401' OR col1='8402' OR col1='8403' OR col1='8404' OR col1='8500'
OR col1='8520'
then '1100' else if col1='8099' then '1000'
else if col1='8820' then '1510'
else if (col1)='8020' OR (col1)='8203' then '1300' else
if (col1)='8600' OR (col1)='8601' OR (col1)='8602' OR (col1)='8603'
OR (col1)='8604' OR (col1)='8650' OR (col1)='8920' OR col1='93' OR col1='95' OR col1='87' then '1200' else '1100'
Thanks in advance
Hope
Help with logic in the Transformer
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The Index() function may be faster. For example:
That having been done, arrange the comparison string in order of likelihood of occurrence to get optimum speed of match.
Code: Select all
If Index("8000,8100,8300,8301,8302,8400,8401,8402,8403,8404,8500,8520", InLink.col1, 1) Then "1100" Else ...
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.