When to use LTRIM and RTRIM

Results 1 to 2 of 2

Thread: When to use LTRIM and RTRIM

  1. #1
    Join Date
    Dec 1969

    Default When to use LTRIM and RTRIM

    I have a dynamic DROP down form field that has been created like this: (Note it allows for multiple selections)<BR><BR>SQL2 = "SELECT &#039;&#060;OPTION Value=&#039;&#039;&#039;+RTRIM(LTRIM(Fname))+&#039 ; &#039;+RTRIM(LTRIM(Lname))+&#039;&#039;&#039;&#062 ;&#039;,Fname, Lname,&#039;&#060;/OPTION&#062;&#039; FROM dbo.Employees ORDER BY Fname" <BR>Set rsEmployee = conn.Execute(SQL2)<BR><BR>after this form gets posted the results are as follows:<BR><BR>Frank Perdue, Bill Perdue, Bob Perdue<BR><BR>This information is also inserted into a DB. HOWEVER<BR>The DB table includes white space before each name starting at the second selection that has been made and not the first. How do I make sure that there is no proceeding or trailing white spaces after each select first name and last name combination? The HTML indicates that there shouldn’t be any white spaces but as soon as the page gets posted to the next page it always puts the white space in hence that’s what being inserted into the DB

  2. #2
    Join Date
    Dec 1969

    Default So why not show us

    the bit where you are inserting it into the db?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts