Re: Spaces in Oracle fields

From: Rev Dr Phil Herring <revdoc_at_wumpus.cc.uow.edu.au>
Date: 8 Dec 1994 02:05:22 GMT
Message-ID: <3c5pl2$bvf_at_wabbit.cc.uow.edu.au>


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 = null
	where
		bar is not null
		and
		ltrim(bar) is null;

>In the longer term I need to prevent users from filling a
>screen field with spaces only.

The same logic applies...

  • Phil.
    (c) 1994 Rev. Dr. Phil Herring revdoc_at_wumpus.cc.uow.edu.au
    • Church of the Sacred Dial Tone, Wollongong, Australia - Unauthorised reproduction of this article for profit will result in civil action. All other distribution is encouraged.
Received on Thu Dec 08 1994 - 03:05:22 CET

Original text of this message