Brad,
    There are three trim (LTRIM, STRIM, and TRIM) functions.  You want LTRIM.
SET VAR vstring1 = (LTRIM(.vstring1)).

                                                Jason

Jason Kramer
University Archives and Records Management
002 Pearson Hall
(302) 831 - 3127 (voice)
(302) 831 - 6903 (fax)

On 4/2/2010 1:18 PM, Brad Davidson wrote:

I believe I saw a tip in the removal of leading spaces from a text/varchar string, but cannot find it.

 

I need to compare 2 varchar strings (vstring 1 vs vstring2) and if not a match, append vstring2 to the end of vstring1 and update the note column in the receiving table with this new value (.vstring1 +' '+.vstring2). However, vstring1 may have any number of leading spaces - all 3 entities are varchar data type (note column, vstring1, vstring2).

 

Any tips - much appreciated!

 

Brad Davidson

 





Reply via email to