Re: keeping blanks out of the data
Posted in 1992
Topics: General Discussion
In article <1992Oct6.140938.18612@informix.com> dsimon@jupiter.noname writes:
>In article 24112@advtech.uswest.com,yslas@riverauswest.com ( Rob Yslas) writes:
>>This is probably a dumb question but I don't have an sql/preform manual for this
>>information. I am using the standard engine and would like to know if there is a
>>way for me to keep the blanks at the end of a form from being saved (attribute).
>>The user likes to space bar for deletion of mistakes rather then using ^d.
>>I would also like to know if there is an easy way to remove existing blanks from
>>the end of fields in the database or set fields with only blanks to a null. Any
>>help is appreciated.
>>
>>yslas@advtech.uswest.com
>>Thanks
>
>
>Unless you are using On-Line and var-chars, it shouldn't really matter, since
>"Hi" and "Hi " are stored the same way, the only time it would make a difference
>is that there is a difference between NULL and " ".
>
>As to clearing blank fields to NULL, I would suggest an UPDATE similar to this:
>
>UPDATE x SET cola = NULL
> WHERE cola MATCHES " ">
>You should probably play with that to see what the exact syntax you need is. Be aware
>that storing as NULL is not going to change the size of you database files...CISAM
>files are fixed length records, a char(20) is going to take up 20 bytes, regardless
>of what is stored in those bytes.
>
>
>don simon
>Could be wrong, Could be right, Could be I didn't sleep last night.
>
What Don says is true, but please note that when using PERFORM, you
cannot insert NULL into a field. Passing a field without entering
data will result in a field full of blanks.
Nancy
Nancy Suffron
Lenexa CSE
suffron
913-599-8475