on 07-03-2007 4:23 PM
Hi All,
This is the String Value "ashokkumar@yahoo.co.in" from the string value I have to Read Upto "@" character.
Could you hlep me how to Read value upto "@" because I have to sent userName to my target structure.
Thanks and Regards,
Ashok.
Hi Ashok
You can write a simple UDF code
int y=a.indexOf('@');
return a.substring(0,y);
Thanks
Sai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Malavathu,
Create a <b>Value</b> user defined function and name it as <b>GetValue</b>. Take one argument as <b>a</b>. Import <b>Java.*;</b>
Add this code inside it:
int i = a.indexOf("@");
a = a.substring(0,i);
return(a);
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ashok,
You can use StringTokenizer.
StringTokenizer st = new StringTokenizer("ashokkumar@yahoo.co.in","@");
return ""st.nextToken()"";
The above value returns you ashokkumar.
Best regards,
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.