Hi,
I have stuck at here with few hours and my problem is....
i have 2 fields which is optional attribute which mean the data can be null characters.
attribute name attribute data type attribute mandatory/optional
A char(3) optional
B char(3) optional
The business rules is "either A OR B is mandatory"
table A (look up to trans)
|
v
source - > transformer
|
table B (look up to trans)
how i wrote for this code whereby if A having value then B can be no value/having value. if B having value, A can have value/no value but if 2 value empty then all rejected....
Thank you
Stuck on the codes
Moderators: chulett, rschirm, roy
In you transform stage you can handle this with constraints. The "good" output would if something like "ISNULL(In.ColA) + ISNULL(In.ColB) = 1". This works because a "true" is returned as a 1 and a "false" as a 0, so you can use normal math on the returned values. If your answer is more than 1 (i.e. both are null) or less than 1 (both have non-null values) then the row won't go down that link. You can create a reject output to handle those cases.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>