SQL Server Substr Equivalent

Posted by Derek D. on SQL Server Planet See other posts from SQL Server Planet or by Derek D.
Published on Sun, 11 Apr 2010 22:09:30 +0000 Indexed on 2010/04/11 22:13 UTC
Read the original article Hit count: 354

Filed under:
The oracle function equivalent to the SQL Server function of Substr is: Substring. All spelled out. This function is actually identical to Oracle’s function.DECLARE @BaseString varchar(max)SET @BaseString = 'My grandmothers pillows are blue'SELECT SUBSTRING ( @BaseString -- The base string to extract from ,4 -- Start Position ,5 -- Length of Characters )The above query returns the value ‘grand’. Related Posts:»SQL Server Contains [...]

© SQL Server Planet or respective owner

Related posts about OracleEquivalents