wood burning stoves*
The moose likes JDBC and the fly likes StringTokenizer Usage in Oracle Field Values???!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "StringTokenizer Usage in Oracle Field Values???!!" Watch "StringTokenizer Usage in Oracle Field Values???!!" New topic
Author

StringTokenizer Usage in Oracle Field Values???!!

nabhilash
Greenhorn

Joined: May 10, 2001
Posts: 8
Dear Friends
I have got a typical problem.
I have got a field in applet where in the customer can enter his Car Registration number like MH-10/GHTRE-4522.ok.
By checking this number at my backend i retrieve the latest details of his car loans to the customer.
Now Conditions/validations is that the customer should not be forced to enter [/ - ,.] etcs in the applet field.
He may enter directly MH10GHTRE4522 WITHOUT ANY [/.!] etc's.
Now I removed these [/!--] from my applet field before sending data to my servlet using StringTokenizer function.
But now problems arise how to check these values at backend!! In oracle is there any wya to remove all these / -' etcs ..
Can anyone help me
Solution urgently needed Thanks in advance
Ambrose Tati
Ranch Hand

Joined: Oct 03, 2000
Posts: 55
Hi there,
In Oracle there's a function called replace that you can use.
Examples:
1) To remove all instances of the letter "C" in string
"CAT CALL", a call to replace('CAT CALL','C') will return a
string containing 'AT ALL'
2) To replace all occurrences of "99" with "100" in string
"Zero defects in period 99 reached 100%!", a call to
replace('Zero defects in period 99 reached 100%!',
'99',
'100') will return a string containing
'Zero defects in period 100 reached 100%!'

Hope this is what you're looking for.
Cheers
Ambrose
 
 
subject: StringTokenizer Usage in Oracle Field Values???!!
 
Similar Threads
Oracle JDBC - BIT is LONG??
Conversations with computers users!
Conversion help plz!!!
B&S Booking and locking
Arraylist