Home » Developer & Programmer » Forms » validate item on varchar
validate item on varchar [message #206873] Fri, 01 December 2006 20:07 Go to next message
SPRAS881
Messages: 2
Registered: December 2006
Junior Member
hi
i have a column drug_dosage with datatype varchar, i want to include a validate item for the number in the data so that it cant be <= 0,
i tried to use the rtrim as suggested in previous replies of this forum its working but not properly like
if i have inputs
100 ml
1 per day
10 ml
its trimming 'ml' and 'day' but leaving behind 'per'
how can i make it take only number so that i can validate it

thanks
Re: validate item on varchar [message #206917 is a reply to message #206873] Sat, 02 December 2006 04:31 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If numbers are always at the beginning and there's always at least one space behind it, use INSTR function which will search for a space; use this value in SUBSTR function to fetch only numeric value.
Re: validate item on varchar [message #207042 is a reply to message #206873] Mon, 04 December 2006 00:30 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Next time please show the code that you are using.

Put a 'space' in the character list of the 'rtrim'. See http://www.orafaq.com/forum/m/173919/67467/?srch=rtrim#msg_173919

David
Previous Topic: Focus lost navigating forms in web deployment of forms 6i
Next Topic: state where no record match LOV
Goto Forum:
  


Current Time: Sat Dec 03 20:09:09 CST 2016

Total time taken to generate the page: 0.14144 seconds