• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

StringTokenizer Usage in Oracle Field Values???!!

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic