Dear All,
I am have the following requirement, which I am trying to put in the UDF and facing some challenges. Kindly help.
In the UDF, I have a constant, say CONST = "A".
There is a variable, say VAR. I have to count the number of occurrences for "A" in VAR.
I am using the below code, which is throwing error (it's just a piece from rest of the code):-
char CONST = 'A';
int count = 0;
int VAR_Length = VAR.length();
for (int i = 0; i < VAR_Length; i++)
{
if (CONST.equals(VAR<i>))
Count++;
}
I am using "Single Values" rather than "Queue" in the UDF. I intend to return a flag value of "x" from my UDF, so I am not sure how I can use "Queues" in here.
Please help. Thanks for your help and efforts.
--Abhi