ejr19592004
asked on
Selecting special characters
Hello,
I have a number of columns in my dataset one/or more of which I believe might have an embedded special character such as a CR or LF. I have tried using the following in my query:
patindex('%' + char(13) + '%' , texfield) > 0 to no avail. I have also tried charindex with the same result.
I know that the special character is there because when I export the data out to text somewhere along the way the records gets truncated into two.
I would like to be able to locate this special character and strip it out. Any suggestions.
My next step is to write a VB program to go through the dataset.
Thanks
Eddie
I have a number of columns in my dataset one/or more of which I believe might have an embedded special character such as a CR or LF. I have tried using the following in my query:
patindex('%' + char(13) + '%' , texfield) > 0 to no avail. I have also tried charindex with the same result.
I know that the special character is there because when I export the data out to text somewhere along the way the records gets truncated into two.
I would like to be able to locate this special character and strip it out. Any suggestions.
My next step is to write a VB program to go through the dataset.
Thanks
Eddie
ASKER
ACPerkins,
Thanks for your quick response. Is the line
PATINDEX('%[^0-9][^A-Z][^a -z]%', textfield) > 0
meant to look for anything that is not 0-9 A-Z and a-z ?
ejr19592004
Thanks for your quick response. Is the line
PATINDEX('%[^0-9][^A-Z][^a
meant to look for anything that is not 0-9 A-Z and a-z ?
ejr19592004
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
PATINDEX('%[^0-9][^A-Z][^a
To give you non-alpha-numeric characters.
Or to give you non-printable characters, something like:
PATINDEX('%[^ - Ç]%', textfield) > 0