Page 2 of 2

Posted: Sun Dec 10, 2006 5:19 am
by Nageshsunkoji
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()

Posted: Sun Dec 10, 2006 11:48 pm
by ajith
You cannot Use Null validation functions along with Null handling functions ...

Try to do the null handling without using the null handling functions by equating to '' . I think that will sort that out..

Hope that helps ..
Ajith

Posted: Wed Dec 13, 2006 3:48 am
by KadetG
sorry I don`t fined as I can delete my post

Posted: Wed Dec 13, 2006 4:02 am
by ajith
thebird wrote:Why not try replace the IsNull()/IsNotNull() with a NullToEmpty like this -

Code: Select all

If (i/p_column1 = "A" AND trim(NullToEmpty(ip_column2))<>"") Then ip_column2[1,7] ELSE SetNull()
Or if you want to use to IFs (not adviced) -

Code: Select all

If i/p_column1 = "A" Then (If trim(NullToEmpty(ip_column2))<>"" Then ip_column2[1,7] ELSE SetNull()) Else SetNull()
Aneesh
What aneesh says is right. I got this problem resolved when I did that.
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()