Charindex In Sql Server Code Example


Example 1: locate sql server

SELECT CHARINDEX('b','ab') //returns 2

Example 2: charindex

DECLARE @document VARCHAR(64);   SELECT @document = 'Reflectors are vital safety' +                      ' components of your bicycle.';   SELECT CHARINDEX('bicycle', @document);   GO

Comments

Popular posts from this blog

Chemistry - Bond Angles In NH3 And NCl3

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?