SELECT First 20 Chars of(ColName) from DB
Is this possible?
SELECT First 20 Chars of(ColName) from DB
Is this possible?
SELECT left(ColName,20) AS First20 /*(Or 30 if we are looking at the title)*/
FROM YourTable
Hi,
You can simply use one of the built in string functions. There are many variants so its best to see which one suits your situation best.
Enjoy!
Assuming that colname is VARCHAR, all the above will pad shorter strings to 20 characters.
If this is not what you want, then:
SELECT RTRIM(LEFT(colname, 20)) FROM DB