SQLScript String Function Left in SAP HANA
SQLScript string function LEFT is a string function for programmers to get the first n characters from beginning of a given string value.
SQLScript developers use string function Left to returns the first characters from the first character of a string.
Left() string function has two arguments; first input string, second is the number of characters to return from the beginning of the text variable.
Here is sample SQLScript code
declare v_url nvarchar(50) := 'SAP HANA SQLScript string function Left';
select left(v_url, 18) as First5Characters from dummy;
v_url := 'ŞĞÜİÇÖığçö';
left(v_url, 5) as First5Characters,
left(v_url, 10) as First10Characters,
left(v_url, 20) as First20Characters
Here is the outputs of the Left string function in SQLScript executed on SQL Console
For SQLScript developers, official documentation on SQL string function Left can be viewed at SAP Help Portal