F
F
Fyodor2015-05-22 13:29:49
SQL Server
Fyodor, 2015-05-22 13:29:49

How to create a SQL trigger to "normalize" a phone number?

There is a field with a phone number in the database, it is a regular text field.
I didn't deal with triggers before, it is necessary that a field with a value of the form, for example "+7 (912) 123-12387 after 18" be converted to the form "791212312387" i.e. Throw out everything except numbers from the string. Is it possible to do so?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
NETChaser, 2015-05-22
@NETChaser

https://msdn.microsoft.com/en-us/library/ms186862.aspx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question