So I have been going round in circles with this and have admitted I need help!

This is in the UK and we have phone numbers and other information uploaded into a table using EasyCSV, the problem is the numbers need to be formatted with no spaces (have this bit covered) and start with 44 (UK dialling code) for use in an external system. The field that stores the number is formatted as text and unfortunately numbers often sometimes get uploaded as 07111 022096 (no idea if this number exists just a random example of format) when the required format would be 447111022096

What I need is a trigger on insert of data to the table to check if the first number is a 0 and if so replace with 44 if it is, I have tried various methods but end up replacing all the 0's in the string with 44 so it ends up looking something like 44711144224496

Any help would be greatly appreciated cheers, Roosta

You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

## Question

## Roosta

Hello all,

So I have been going round in circles with this and have admitted I need help!

This is in the UK and we have phone numbers and other information uploaded into a table using EasyCSV, the problem is the numbers need to be formatted with no spaces (have this bit covered) and start with 44 (UK dialling code) for use in an external system. The field that stores the number is formatted as text and unfortunately numbers often sometimes get uploaded as 07111 022096 (no idea if this number exists just a random example of format) when the required format would be 447111022096

What I need is a trigger on insert of data to the table to check if the first number is a 0 and if so replace with 44 if it is, I have tried various methods but end up replacing all the 0's in the string with 44 so it ends up looking something like 44711144224496

Any help would be greatly appreciated cheers, Roosta

## Link to comment

## Share on other sites

## 4 answers to this question

## Recommended Posts

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Note:Your post will require moderator approval before it will be visible.