Hi,
The main reason for your problem in compilation is, your using Isnotnull and substring function together on same field and at the same time.
So, Split the condition and use the logic like these.....
If Col1='A' Then If Isnotnull(Column2) Then Column2[1,7] Else Setnull() Else Setnull()
compilation error - transformer stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 222
- Joined: Tue Aug 30, 2005 2:07 am
- Location: pune
- Contact:
What aneesh says is right. I got this problem resolved when I did that.thebird wrote:Why not try replace the IsNull()/IsNotNull() with a NullToEmpty like this -
Or if you want to use to IFs (not adviced) -Code: Select all
If (i/p_column1 = "A" AND trim(NullToEmpty(ip_column2))<>"") Then ip_column2[1,7] ELSE SetNull()
AneeshCode: Select all
If i/p_column1 = "A" Then (If trim(NullToEmpty(ip_column2))<>"" Then ip_column2[1,7] ELSE SetNull()) Else SetNull()
Do not use any null handling functions along with trim. I am sure that that will sort the problem out
Code: Select all
If (i/p_column1 = 'A' AND TrimLeadingTrailing(ip_column2)<>'') Then ip_column2[1,7] ELSE SetNull()