--string function. Returns the ASII code of the leftmost letter of the string
Print ASCII (' ABCDE ')
Print ASCII (')
Print char (--ASCII) conversion between code and characters
--*charindex The starting index of the corresponding character segment in the lookup string, starting at 1
Print charindex (' de ', ' ABCDEFG ')
--concat string Links
print ' abc ' + ' de '
--
Select SOUNDEX (' Hello ')
Select SOUNDEX (' hell ')
Select Soundex (' Hella ')
--diference returns the similarity of a string
Select difference (' Hello ', ' hell ')
--space help you print out the blanks
Select ' A ' +space (Ten) + ' B '
--*left intercepts the string at the beginning of the specified length. Right truncate end specifies length.
Select Left (' Abcdefgh ', 3)
Select Right (' Abcdefgh ', 3)
--*len the space to calculate the length, returning an integer.
Select LEN (' abc ')
--*lower uppercase to lowercase. Upper lowercase to uppercase
Select LOWER (' ACDE ')
Select UPPER (' ABCDE ')
--*ltrim Remove the front space. RTrim Remove Right space
Select LTRIM (' A A ')
Select RTRIM (' A A ')
--Find the first alphabetical index of the matching wildcard character segment that matches the criteria, like
Select PATINDEX ('%de% ', ' abcdef ')
--*replace find replacement, three parameters. 1. Target string 2. Character segment to check 3. Which character segment to replace
Select REPLACE (' abcdefabhhhhhhh ', ' ab ', ' @# ')
--replicate copies the specified number of times and stitching it back into a string
Select REPLICATE (' Dee ', 3)
--*reverse flipping A string
Select REVERSE (' ABCDE ')
--str float type, after interception, converted to string type
Select STR (1112.12345,3,2)
--stuff Delete a specified length of Word string from the specified position before inserting a new character segment
Select STUFF (' Abc123hhhhhh ', 4,15, ' abc ')
--*substring Intercept string
Select SUBSTRING (' ABCDE ', 4,2)
--Data type conversion function
--cast function
Select CAST (' 123 ' as int)
--convert function, which is the opposite of cast
Select CONVERT (int,12.3)
String functions and data type conversion functions