Quantcast
Channel: Substring In Sql | Automatic Website Traffic RSS
Viewing all articles
Browse latest Browse all 989

Using SQL Server's CHARINDEX and PATINDEX

$
0
0

Here is some T-SQL code to display only the last name for the first 5 records in the Northwind Customer table. select top 5 substring(ContactName, charindex(' ',ContactName)+1 , len(ContactName)) as [ ...

Viewing all articles
Browse latest Browse all 989

Trending Articles