Export (0) Print
Expand All
Expand Minimize

Returns a character expression after removing leading blanks.



LTRIM (character_expression )

character_expression

An expression of character or binary data. The character_expression argument must be of a data type that is implicitly convertible to nvarcharorntext.


nvarchar or ntext

The following example removes leading blanks from the names of customers listed in the MyCustomers table.

INSERT INTO Customers
                         ([Customer ID], [Company Name])
VALUES        ('TEMP', '    A. Datum Corporation');

SELECT        [Customer ID], LTRIM([Company Name]) AS Expr1
FROM            Customers
WHERE        ([Customer ID] = 'TEMP');
Show:
© 2014 Microsoft