Re: Spaces in Oracle fields

From: David Bath <dtb_at_hera.bf.rmit.edu.au>
Date: 9 Dec 1994 03:57:30 GMT
Message-ID: <3c8kja$n5p_at_aggedor.rmit.EDU.AU>


Rev Dr Phil Herring <revdoc_at_wumpus.cc.uow.edu.au> writes:

>In article <3c6tdb$36c_at_cs3.brookes.ac.uk> Tommy Wareing, p0070621_at_brookes.ac.uk writes:
>>>In article <1994Dec7.105815.22775_at_bilpin.co.uk> Tony Desborough,
 tony_at_bilpin.co.uk writes:
>>>In the short term I need an SQL update statement
>>>to set a field to NULL if it contains spaces (and only spaces).
>>
update foo
set bar = decode (length(trim(bar)),

		0, NULL,
		bar
		);
--
---
David T. Bath       | dtb_at_ftp.bf.rmit.edu.au
3/175 Wattletree Rd | Snr Tech Consultant, Global Consulting Services
MALVERN 3144 VIC    | 179 Grattan St, Carlton, Vic 3053, Australia
+61 3 500 9337      | Ph:+61 3 3477411  Fx:+61 3 3470182 Mb: +61 15 824171
WWW pages incl. ORA FAQ: lynx http://www.bf.rmit.edu.au/~dtb
Received on Fri Dec 09 1994 - 04:57:30 CET

Original text of this message