Copyin statement with null strings

ncourdy@vms.macc.wisc.edu (Nabil Courdy) writes:
: I have a table with 7 fields, 4 of which are nullable.  I load
: the table using the copy....from 'fileName' statement.  For the
: nullable fields the copy format looks like this:
: 
: 			.
: 		servingsize=char(0)tab with null('N/A')
: 		studyno=char(0)tab with null('N/A')
: 			.
: 
: When the table is loaded, the nullable fields do not have the value
: 'N/A' in them.  However, I am able to select rows where studyno or
: servingsize 'is null'.  Why isn't the copy command assigning values,
: am I missing something?

Yup, but it happens to the best of us--or to me anyway. :-)

You are confusing the string used to represent a null value in the file
with the string displayed to the user to indicate a null. I think you
will find that setting the II_NULL_STRING environment variable will do
the trick for you; viz

  setenv II_NULL_STRING 'N/A'

provided that you want 'N/A' to appear for all nulls everywhere.

--Roy Hann
Ingres Q & A
To William's Home Page

© William Yuan 2000

Email William