Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adapting the LEFT function 1

Status
Not open for further replies.

sinbadly

Technical User
Mar 16, 2006
126
GB
How can I adapt this code, Experts, please, to say 'miss 4 characters and then begin the LEFT function?'

SELECT id, head, CONCAT(LEFT(story, 120), ' ...') AS bb, DATE_FORMAT(updated, '%d/%m/%y') as ud FROM maths ORDER BY id ");
 
How about:
[tt]
CONCAT(LEFT(SUBSTRING(story,4),120),'...')
[/tt]
 
Sorry, the 4 should have been a 5, and you can also simplify it:
[tt]
CONCAT(SUBSTRING(story,5,120),'...')
[/tt]
 
Terrific, Tony. Thanks very much indeed. Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top