Fred Williams wrote:

Would it not be more logical to modify the .import command to place a
null value in a column where the input value is non existent? (i.e. Back
to back separators in the input)  Null in, null out.


Fred,

If you did that, there would be no way to enter an empty string as a value. A NULL is not the same as an empty string.

Since the shell already defines a reasonable way to convert a NULL to a sentinel string on output, it makes more sense to me to reuse that, than it does create another special purpose mechanism to allow a user to enter an empty string. If the shell recognizes the same sentinel value on input, it can substitute a real NULL value. The only danger I see is that the initial value of the .nullvalue sentinel string may be an empty string (since it converts NULLs to empty strings by default on output). In this case it would also convert empty strings on input into NULLs, so we would have the same situation where it's not possible to enter an empty string. To prevent this the .nullvalue string should be initialized to a NULL and then no substitution should be done on input unless the user changes it to some other value. I don't think you can change the output handling (by default a NULL and an empty string look the same). There would also need to be a mechanism to set the .nullvalue string back to NULL to turn off the input substitution.

Dennis Cote


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to