set item in form

how can i set value to this after insert
6210-14-242-8258
 
set item emp to be in this format after i insert which trigger must i use
chalie001Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
Isn't this the same as your previous question:
https://www.experts-exchange.com/questions/29008102/inserting-value-in-table-in-oracle-form.html

I remember other questions that were very similar about screen masking versus inserting the data.
0
chalie001Author Commented:
no is not the same i just what to display value in this form in oracle form 6210-14-242-8258
0
slightwv (䄆 Netminder) Commented:
If you want to physically update the data to add the dashes in the table on insert, then the form should just be able to display what it receives without any format masking.

If this is what you want to do, you should be able to apply the formatting inside the form and insert the data in the desired format.  I remember you asked a question on how to do that.  I just cannot find it.

I've not used forms for many years but are you wanting forms triggers or database level triggers?

If database level triggers:
If you cannot get forms to insert the data correctly, as a last resort you should be able to create a before insert trigger.  You might need an after insert trigger if forms interferes with the before trigger.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

awking00Information Technology SpecialistCommented:
Can you show some sample values that get inserted and how you would like them to be after an update?
0
chalie001Author Commented:
FM0999-99-999-9999
0
slightwv (䄆 Netminder) Commented:
Between this question and your other one, I'm not sure what you are trying to do and where you are trying to do it so I'll post this in both questions and hope it helps.

If you want to turn a set of numbers and apply a mask to add dashes at specific places, a regexp_replace will do that.

Here is an example:
with mydata as (
	select '8745155258732' mycol from dual
	union all
	select '9874166787831' mycol from dual
	union all
	select '3748177602234' mycol from dual
)
select regexp_replace(mycol,'([0-9]{4})([0-9]{2})([0-9]{3})([0-9]{4})','\1-\2-\3-\4')
from mydata;

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chalie001Author Commented:
select regexp_replace(mycol,'([0-9]{4})([0-9]{2})([0-9]{3})([0-9]{4})','\1-\2-\3-\4')
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.