----- Original Message -----
From: "Ben Forta" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, March 05, 2002 3:07 PM
Subject: RE: Trim in SQL


> There is no TRIM(), but there is a RTIM() and a LTRIM():
>
> SELECT foo from bar
> WHERE RTRIM(LTRIM(narf)) is like 'blah'

Thanks, unfortunatly it's not quite the same - it only trims spaces (maybe
tabs too, didn't test), not other whitespace like (specifically) CR and LF.
I have done the following instead, but it's a bit hacky...

Replace(Replace(narf, Char(10), ''), Char(13), '')

---
James Sleeman
______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to