Answer» - The functions that are used for manipulating the character data are CALLED String Functions.
- LEFT: This function RETURNS the specified number of characters from the left part of a string.
- Syntax: LEFT(string_value, numberOfCharacters).
- For example, LEFT(‘InterviewBit’, 9) will RETURN ‘Interview’.
- RIGHT: This function returns the DEFINED number of characters from the right part of a string.
- Syntax: RIGHT(string_value, numberOfCharacters)
- For example, RIGHT(‘InterviewBit’,3) would return ‘Bit’.
- SUBSTRING: This function would select the data from a specified start position through the number of characters defined from any part of the string.
- Syntax: SUBSTRING(string_value, start_position, numberOfCharacters)
- For example, SUBSTRING(‘InterviewBit’,2,4) would return ‘terv’.
- LTRIM: This function would trim all the white spaces on the left part of the string.
- Syntax: LTRIM(string_value)
- For example, LTRIM(’ InterviewBit’) will return ‘InterviewBit’.
- RTRIM: This function would trim all the white spaces on the right part of the string.
- Syntax: RTRIM(string_value)
- For example, RTRIM('InterviewBit ') will return ‘InterviewBit’.
- UPPER: This function is used for converting all the characters to the upper case in a string.
- Syntax: UPPER(string_variable)
- For example, UPPER(‘interviewBit’) would return ‘INTERVIEWBIT’.
- LOWER: This function is used for converting all the characters of a string to lowercase.
- Syntax: LOWER(string_variable)
- For example, LOWER(‘INterviewBit’) would return ‘interviewbit’.
|