Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql character index

-- EXAMPLE
select 
	'0004V0' as TESTER_STRING
	, CHARINDEX('V','0004V0') -- OUTPUT: 5
	, CHARINDEX('0','0004V0') -- OUTPUT: 1
	, CHARINDEX('0','0004V0',4) -- OUTPUT: 6
from DUAL;

-- SYNTAX
CHARINDEX(/*substring*/, /*Main string*/, /*start index*/)
 
PREVIOUS NEXT
Tagged: #sql #character #index
ADD COMMENT
Topic
Name
9+6 =