Does any have any query that returns apha numerice values only
Sample
Select FirstName,Surname,NationalID From Contacts
Results
FirstName|Surname|NationalID
Tony |Smith |934&#fdsaf$34£51
Mary |Jones |655^!ffdat@389£2
Expected results
FirstName|Surname|NationalID
Tony |Smith |934fdsaf34£51
Mary |Jones |655ffdat389£2
In other words i want the query to return numbers and text only :. A-Z and 0-9 only remving ‘$%^&*(~>
You could try the patindex function. For example with just selecting the FirstName this will remove the first occurrence of non alphanumeric:
To expand this to removing all occurrences, move the patindex call into a function as mentioned here:
Finally call the function