Solved

sql trim text

Posted on 2011-03-01
2
655 Views
Last Modified: 2012-06-27
How do I trim a text that I select from a table, so that it returns max 10 char?
For example:  "Financial Times, said it was freezing shares" should be "Financial ..."
0
Comment
Question by:johnkainn
2 Comments
 
LVL 8

Assisted Solution

by:Forefront_Data_Solutions
Forefront_Data_Solutions earned 62 total points
Comment Utility
Select Left([FieldName],10)
From SomeTable
0
 
LVL 23

Accepted Solution

by:
Rajkumar Gs earned 63 total points
Comment Utility
SELECT LEFT('Financial Times', 10)

Open in new window

0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now