Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL - PL/SQL Question. Please Help!!
On Tue, 15 Jun 1999 16:28:11 -0700, "George Gifford"
<georgegifford@~usa~.net <--- ANIT-SPAM (Remove ~)> wrote:
>Does anyone have any suggestions or pl/sql code that will accept a tablename
>and then update/replace ALL Null Numeric fields with a 0, and all Null
>VarChar2 Fields with a space (' ')??
Here is a SQL statement that should work for you:
UPDATE TABLEX SET NUMFIELD = NVL(NUMFIELD,0), CHARFIELD = NVL(CHARFIELD,' ');
Make sure that you do change your varchar2 field to one space. Oracle will interpret '' as null, but ' ' is one space and is not null.
regards,
Jonathan
![]() |
![]() |