iAlpine.net
A journey of exploration and discovery

SQL SUBSTRING function returns back a part of text, binary or image expression

January 18, 2009 19:11 by mihko


To get back a part of text in MS SQL  you might want to consider using Substring function.

Example:

SELECT SUBSTRING ([ContactName], 1,5) AS First5CharOfContactName
FROM [Northwind].[dbo].[Customers]

This will return you back first five characters in the filed ContactName.

The Syntax goes as:

SUBSTRING (expression, start, length )


Comments

January 20. 2009 10:05

Busby SEO Test

your post is great,.,.,thanks for a very useful information.,i really appreciate it!!and keep up the good work!!

Busby SEO Test

December 11. 2009 11:04

Sonoma lodging

Really fascinating subject, I will bookmark your website to check if you write more in the future. Kind regards,




Regards
Shaw

Sonoma lodging

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading




  

Sponsors


www.knetit.net

Kiva - loans that change lives


  

Job Board for Web Designers and Web Developers

The On Demand Global Workforce - oDesk

affiliate_link