Answers for "sql char index"

SQL
3

locate sql server

SELECT CHARINDEX('b','ab') //returns 2
Posted by: Guest on May-26-2020
0

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*/)
Posted by: Guest on May-17-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language