[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1977
  • Last Modified:

How to cut string in mySQL

I need replace all '\r' into string end
(For example: 'mystringdata\r' on
'mystringdata') ?

How to make it?
0
tom999
Asked:
tom999
  • 3
  • 2
1 Solution
 
abaldwinCommented:
Just seeking clarification.  Do you want to drop the "\r" from data in a table, or is this in some code writer?
0
 
tom999Author Commented:
Yes, i want to drop the "\r" from data in a table (in one colon)
0
 
abaldwinCommented:
The following SQL update the data in "Table1" to its current value minus the last two characters. This is assuming that the "\r" is the last 2 characters of the data.

UPDATE Table1 SET FieldName = Left([FieldName],(Len([FieldName])-2));

0
 
tom999Author Commented:
Thank you !
0
 
abaldwinCommented:
Your welcom
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now