Home » Developer & Programmer » Forms » how to enter phone no starting with 0..
how to enter phone no starting with 0.. [message #309959] Sun, 30 March 2008 13:11 Go to next message
sagar002100
Messages: 12
Registered: March 2008
Junior Member
hi,,
i want to enter phone number with city code (e.g.079-123456), which generally has 0 at the start..and my field type is number..so how to save the phone number starting with 0..????
Re: how to enter phone no starting with 0.. [message #309960 is a reply to message #309959] Sun, 30 March 2008 13:28 Go to previous messageGo to next message
varu123
Messages: 754
Registered: October 2007
Senior Member
Quote:
e.g.079-123456

This is not a number.You can not use number to store alplanumeric values.
Change the datatype to varchar2

[Updated on: Sun, 30 March 2008 13:33]

Report message to a moderator

Re: how to enter phone no starting with 0.. [message #309961 is a reply to message #309960] Sun, 30 March 2008 13:38 Go to previous messageGo to next message
sagar002100
Messages: 12
Registered: March 2008
Junior Member
i tried it..bt it didnt work..Actually i wann to enter 079135645 not 079-125645...
Re: how to enter phone no starting with 0.. [message #309963 is a reply to message #309959] Sun, 30 March 2008 13:42 Go to previous messageGo to next message
varu123
Messages: 754
Registered: October 2007
Senior Member
What did you try?

If your datatype is number,use to_char function when inserting rows.
Re: how to enter phone no starting with 0.. [message #309964 is a reply to message #309963] Sun, 30 March 2008 13:45 Go to previous messageGo to next message
sagar002100
Messages: 12
Registered: March 2008
Junior Member
thankxxxxxxxx
Re: how to enter phone no starting with 0.. [message #309971 is a reply to message #309963] Sun, 30 March 2008 16:05 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
varu123 wrote on Sun, 30 March 2008 20:42
If your datatype is number,use to_char function when inserting rows.

I'm not sure I understood this; what good would that do? If a column is of a NUMBER datatype, there's no function (that I know of) which will allow anyone to insert value with a leading zero.

In other words: if you want to store a value with a leading zero, you'll have to use CHARACTER column datatype (as suggested in the second message).

The answer was
sagar002100
i tried it..bt it didnt work
Sorry, but I don't believe you. Can you prove it?
Re: how to enter phone no starting with 0.. [message #310018 is a reply to message #309959] Mon, 31 March 2008 00:03 Go to previous messageGo to next message
azamkhan
Messages: 548
Registered: August 2005
Senior Member
Dear Friends,

who said that you cann't you this "079-123456" as number. See FORMAT MASK property and you will find your solution.


Regards,
Azam Khan
Re: how to enter phone no starting with 0.. [message #310278 is a reply to message #310018] Mon, 31 March 2008 16:46 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Sure. Do that and, after committing changes, please, copy and paste SQL*Plus session in which you SELECT value you've just stored through a form. I'd really love to see a NUMBER datatype column with a leading zero.
Previous Topic: How to run a SQL-statement in Forms
Next Topic: Problem in loop to search values
Goto Forum:
  


Current Time: Thu Dec 08 22:21:04 CST 2016

Total time taken to generate the page: 0.26272 seconds