Subject | RES: RES: RES: [firebird-support] String Concatenation with null field |
---|---|
Author | Fabrício Fadel Kammer |
Post date | 2006-01-10T15:45:01Z |
OK,
Are there a solution to I create a new database using the metadata of my
actual database setting the NOT NULL and defining the default = ''
(empty strings) ???
And how can I migrate the data from my old database (where I can have
null strings) to my new database (where I couldn't have null string)
setting the null string fields to empty strings ''?
Thanks again
Fabrício
-----Mensagem original-----
De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Jason Dodson
Enviada em: terça-feira, 10 de janeiro de 2006 11:38
Para: firebird-support@yahoogroups.com
Assunto: Re: RES: RES: [firebird-support] String Concatenation with null
field
A rule of thumb that I always follow... never allow a string field to be
null.
Simple. Your alternative is to either coalesce NULLS into something
meaningful
to you (most likely '') or in your where clauses have "Where myfield is
not null
and myfield <> ''".
Having a field ALLOWED to be NULL is simply a referential shortcut
anyway. It
saves you from having a linking table and a join. NULL implies that if
you did
use a linking table, it wouldn't join at that field (just like you would
get a
null with a left join).
Jason
Fabrício Fadel Kammer wrote:
The information transmitted herewith is sensitive information intended
only for use to the individual or entity to which it is addressed. If
the reader of this message is not the intended recipient, you are hereby
notified that any review, retransmission, dissemination, distribution,
copying or other use of, or taking of any action in reliance upon, this
information is strictly prohibited. If you have received this
communication in error, please contact the sender and delete the
material from your computer.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
_____
YAHOO! GROUPS LINKS
* Visit your group "firebird-support
<http://groups.yahoo.com/group/firebird-support> " on the web.
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe
Service <http://docs.yahoo.com/info/terms/> .
_____
[Non-text portions of this message have been removed]
Are there a solution to I create a new database using the metadata of my
actual database setting the NOT NULL and defining the default = ''
(empty strings) ???
And how can I migrate the data from my old database (where I can have
null strings) to my new database (where I couldn't have null string)
setting the null string fields to empty strings ''?
Thanks again
Fabrício
-----Mensagem original-----
De: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] Em nome de Jason Dodson
Enviada em: terça-feira, 10 de janeiro de 2006 11:38
Para: firebird-support@yahoogroups.com
Assunto: Re: RES: RES: [firebird-support] String Concatenation with null
field
A rule of thumb that I always follow... never allow a string field to be
null.
Simple. Your alternative is to either coalesce NULLS into something
meaningful
to you (most likely '') or in your where clauses have "Where myfield is
not null
and myfield <> ''".
Having a field ALLOWED to be NULL is simply a referential shortcut
anyway. It
saves you from having a linking table and a join. NULL implies that if
you did
use a linking table, it wouldn't join at that field (just like you would
get a
null with a left join).
Jason
Fabrício Fadel Kammer wrote:
> Hi Helen,alter
>
> I agree with you, but I've a lot of clients using my software and the
> NULL string field was not important when the software was developed.
> I'll have a lot of work and perhaps problems with validations if I
> my database defining all string fields as NOT NULL and the defaultvalue
> as a empty string.new
>
> If I alter the database I'll need to import the actual database to a
> and do the validations of null fields.... It'll give me a lot of work!databases.
>
> I stay surprise with this because it doesn't occour in Oracle
>--
> Thanks
>
> Fabrício F. Kammer
The information transmitted herewith is sensitive information intended
only for use to the individual or entity to which it is addressed. If
the reader of this message is not the intended recipient, you are hereby
notified that any review, retransmission, dissemination, distribution,
copying or other use of, or taking of any action in reliance upon, this
information is strictly prohibited. If you have received this
communication in error, please contact the sender and delete the
material from your computer.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
_____
YAHOO! GROUPS LINKS
* Visit your group "firebird-support
<http://groups.yahoo.com/group/firebird-support> " on the web.
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe
>* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .
_____
[Non-text portions of this message have been removed]