help again
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: help again

Hybrid View

  1. #1
    Join Date
    Jun 2001
    Posts
    316
    HI,
    I ve written a procedure which reads data from data file and inserts it in to a table in the d/b
    Now ive given all the cols in my tables as not null(company rule)..lol
    Now the data file contains null data at some places...
    Now Ive made it clear in the proc that if i find a null data ,replace it with ' '.
    But still it doesn't :(
    I even tried giving the default value for each col as ' '.
    Even that doesn't work
    pls help

    Any kinda suggestion is invited.
    thanx a lottttttttt

  2. #2
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    pls show your table and proc, it will be easier to find why it doesn't work )

  3. #3
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    1,185
    Try using a string like 'NULL' or 'EMPTY'. It is an ugly fix, but this is not really a technical issue.

    Why are all columns NOT NULL when it does not reflect the state of the business?

    Good luck.
    David Knight
    OCP DBA 8i, 9i, 10g

  4. #4
    Join Date
    Jun 2001
    Posts
    316
    I still cannot get throgh with this...

    value:=LTRIM(RTRIM(value,' '),' ');
    if value=null then
    value:=' ';
    end if;
    I ve given this to replace null with empty strings
    thanx

  5. #5
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    test using :
    value := nvl(value,' ')

    BTW : testing nullity using '= null' is not recommended, you should use 'is null'

  6. #6
    Join Date
    Jun 2001
    Posts
    316
    THANXXXXXXXXA LOTT GUYSSS
    I dunno how to thank u guys...
    thanx again

  7. #7
    Join Date
    Feb 2001
    Location
    Kolkata- India
    Posts
    356
    U can use NVL(abc,' ') or give default values to the columns
    There Nothing You cannot Do, The problem is HOW.

  8. #8
    Join Date
    Feb 2001
    Location
    Kolkata- India
    Posts
    356
    U can use NVL(abc,' ') or give default values to the columns
    There Nothing You cannot Do, The problem is HOW.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width