Empty String rejection in Oracle
Posted: Wed Feb 16, 2005 4:36 pm
Hi All,
I am getting an empty value in a field from Binary EBCDIC flat file. When I tried to load it into an Oracle table it says that its a null value and rejects the value. I tried writing a simple transform function to identify whether the incoming value is empty or null and tried replacing it with standard value. Here is my function
If (IsNull(Arg1) Or (Arg1="") Or (Arg1=@NULL) Or (Arg1=@NULL.STR) or (Trim(Arg1)=" ") Or (LEN(TRIM(Arg1)) = 0) ) then
Ans="NA "
End Else
Ans=Arg1
End
and its not working. Can anybody tell me where I am doing the mistake?
Thanks,
Anand.
I am getting an empty value in a field from Binary EBCDIC flat file. When I tried to load it into an Oracle table it says that its a null value and rejects the value. I tried writing a simple transform function to identify whether the incoming value is empty or null and tried replacing it with standard value. Here is my function
If (IsNull(Arg1) Or (Arg1="") Or (Arg1=@NULL) Or (Arg1=@NULL.STR) or (Trim(Arg1)=" ") Or (LEN(TRIM(Arg1)) = 0) ) then
Ans="NA "
End Else
Ans=Arg1
End
and its not working. Can anybody tell me where I am doing the mistake?
Thanks,
Anand.