I have a SQL query that brings back 2 columns of data both of TYPE TEXT.
What i am trying to do is:
UPDATE [DBNAME}
SET [3 15] = SUBSTR([3 15], -1))
where [3 15] LIKE '%;'
Where [3 15] is the column name, i would like to pull the data from that column which has ends in a ';' and then remove the trailing ';'
This would be easy if the column type was string but its not.
Running on a: Microsoft SQL Server 2005 - Developer Edition
Hope this sql will help you
SELECT LEFT('CHAMLY', LENGTH('CHAMLY') -1);
for further reading use http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With