Skip to content
Advertisement

Tag: string

SQL Data cleaning

I have a data set where I am trying to clean data. I want to remove the ** from email-address and phone_number and have just numbers in the phone_number column. how can i do it. Answer Here is one option using string functions: This removes ‘**’ from email, and all non-digit characters from phone_number.

How to check json format in SQL?

I have a table with a column of type Nvarchar where json is stored. But the format of some of its columns is wrong. So I get an error when I parse them all. I want my query to ignore lines that have errors. It gives this error when I run on all lines: JSON text is not properly formatted.

Advertisement