Subject | RE: [firebird-support] How can I find a record in a table that has a null value where the field does not allow a null value? |
---|---|
Author | Svein Erling Tysvær |
Post date | 2009-04-02T07:31:45Z |
I may well be wrong, and have no possibility to try it now, but have you tried
SELECT *
FROM <MyTable>
WHERE <MyNotNullableField> +0 is null
Replace +0 with ||'' if your field is a CHAR or VARCHAR. The idea is that adding +0 will prevent any index to be used for the query.
HTH,
Set
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of SoftTech
Sent: 1. april 2009 22:27
To: firebird-support@yahoogroups.com
Subject: [firebird-support] How can I find a record in a table that has a null value where the field does not allow a null value?
Greetings All,
I was just wondering if anyone else has found a way to find any record in
any and all tables in a Firebird database that should not be null, but is.
We all know how we get here. A field is added that allows nulls when first
created and then it is later changed to not allow nulls.
Any ideas on how this could be done or if there is already any tools out
there that will do this?
Thanks,
Mike
SELECT *
FROM <MyTable>
WHERE <MyNotNullableField> +0 is null
Replace +0 with ||'' if your field is a CHAR or VARCHAR. The idea is that adding +0 will prevent any index to be used for the query.
HTH,
Set
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of SoftTech
Sent: 1. april 2009 22:27
To: firebird-support@yahoogroups.com
Subject: [firebird-support] How can I find a record in a table that has a null value where the field does not allow a null value?
Greetings All,
I was just wondering if anyone else has found a way to find any record in
any and all tables in a Firebird database that should not be null, but is.
We all know how we get here. A field is added that allows nulls when first
created and then it is later changed to not allow nulls.
Any ideas on how this could be done or if there is already any tools out
there that will do this?
Thanks,
Mike