SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, articles, tutorials, code samples, tools and downloads for SAP HANA and ABAP, HANA Database, SQLScript, SAP UI5, Screen Personas, Web Dynpro, Workflow

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

do begin

declare v_url nvarchar(50) := 'SAP HANA SQLScript string function Left';
select left(v_url, 18) as First5Characters from dummy;

v_url := 'ŞĞÜİÇÖığçö';
select
 left(v_url, 5) as First5Characters,
 left(v_url, 10) as First10Characters,
 left(v_url, 20) as First20Characters
from dummy;

end;
Code

Here is the outputs of the Left string function in SQLScript executed on SQL Console

SQLScript String function Left

For SQLScript developers, official documentation on SQL string function Left can be viewed at SAP Help Portal



SAP HANA and ABAP

Install SAP Free
CRM Companies List
Web Based CRM Software


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.