Home > DeveloperSection > Forums > SUBSTRING FUNCTION IN SQLSERVER
Ankit Singh

Total Post:341

Points:2389
Posted on    November-15-2015 10:17 PM

 .NET SQL Server  SQL  SQL Server 2008  SQL Server 2012 
Ratings:


 1 Reply(s)
 253  View(s)
Rate this:
i wnat to use SUBSTRING FUNCTION  in Sqlserver please help me.


aditya kumar Patel

Total Post:250

Points:1782
Supported
Posted on    November-15-2015 10:20 PM

The SUBSTRING() function is used to extract a character string from a given starting position for a given length. 

select CustomerID, SUBSTRING( CustomerName, 1, 4 ) as CustomerName,ContactName,Address,City,PostalCode,Country from Customer

Don't want to miss updates? Please click the below button!

Follow MindStick