[dba-SQLServer]Trim function

Francisco Tapia my.lists at verizon.net
Wed May 21 10:45:19 CDT 2003


there isn't just a simple onestep trim function, but I suppose if you really
wanted one, you could just build a UDF for it, (sql2000 and up).

-Francisco
http://rcm.netfirms.com/

On Wednesday, May 21, 2003 7:16 AM [GMT -8],
Elam, Debbie <DElam at jenkens.com> wrote:

: I have never found a plain trim function for SQL.
: rtrim(ltrim(field)) seems to work to put into one step though.
:
: Debbie
:
: -----Original Message-----
: From: Mark Boyd [mailto:MarkBoyd at mcbeeassociates.com]
: Sent: Wednesday, May 21, 2003 7:40 AM
: To: SQLServerList
: Subject: [dba-SQLServer]Trim function
:
:
:
: Is there a way to trim a field in one step?
:
: I use the 'ltrim' function, but then need to use 'rtrim'.  I would
: like to trim fields in one step, not two.
:
:
:
: Thanks,
:
: Mark Boyd
:
: Sr. Systems Analyst
:
: McBee Associates, Inc.
:
:
:
:
:
: - JENKENS & GILCHRIST E-MAIL NOTICE - This transmission may be: (1)
: subject to the Attorney-Client Privilege, (2) an attorney work
: product, or (3) strictly confidential. If you are not the intended
: recipient of this message, you may not disclose, print, copy or
: disseminate this information. If you have received this in error,
: please reply and notify the sender (only) and delete the message.
: Unauthorized interception of this e-mail is a violation of federal
: criminal law.
:
:   This communication does not reflect an intention by the sender or
: the sender's client or principal to conduct a transaction or make any
: agreement by electronic means.  Nothing contained in this message or
: in any attachment shall satisfy the requirements for a writing, and
: nothing contained herein shall constitute a contract or electronic
: signature under the Electronic Signatures in Global and National
: Commerce Act, any version of the Uniform Electronic Transactions Act
: or any other statute governing electronic transactions.
:
:
: _______________________________________________
: dba-SQLServer mailing list
: dba-SQLServer at databaseadvisors.com
: http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
: http://www.databaseadvisors.com




More information about the dba-SQLServer mailing list