|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
Null ValesA third party has errors getting some data out of an application caused
it appears by null values. I do not know how it has happend but there appear to be a few, not many, long int fields which are empty. This doesn't bother 4D, but does it seem bother the web services. I am trying to write a routine to check all fields on the table But I am finding it difficult to find a way to check if a field is 'null' Has anyone else had to do this? I looked through the archives Torsten Nilsson assinging <>Null:=char(0) but can't see how to use this for a numeric values Thinking of trying next length of field on all numeric vales?! This is on windows with 4D2004 If anyone else had this problem and found a solution please let me know Thanks Roger ********************************************************************** 4D Server v11 SQL has arrived! Buy it NOW at http://store.4ddepot.com 4th Dimension Internet Users Group (4D iNUG) FAQ: http://www.4d.com/support/faqnug.html Archive: http://dir.gmane.org/gmane.comp.lang.inug-4d.tech Unsub: mailto:4D_Tech-Unsubscribe@... Post: mailto:4d_tech@... Options: https://lists.4d.com/mailman/listinfo/4d_tech ********************************************************************** |
|
|
RE: Null ValesPerhaps the number is a NaN (not a number) - can be caused by division by
zero and several other causes. I think these can be detected as being both greater than and less than zero. Cheers, Ian > A third party has errors getting some data out of an application caused > it appears by null values. > I do not know how it has happend but there appear to be a few, not many, > long int fields which are empty. > This doesn't bother 4D, but does it seem bother the web services. ********************************************************************** 4D Server v11 SQL has arrived! Buy it NOW at http://store.4ddepot.com 4th Dimension Internet Users Group (4D iNUG) FAQ: http://www.4d.com/support/faqnug.html Archive: http://dir.gmane.org/gmane.comp.lang.inug-4d.tech Unsub: mailto:4D_Tech-Unsubscribe@... Post: mailto:4d_tech@... Options: https://lists.4d.com/mailman/listinfo/4d_tech ********************************************************************** |
|
|
Re: Null ValesOh yes it DOES bother 4D...
A NULL value in a numeric field, for example, can screw up the use of SUM, AVE, Subtotal, etc. Null values mean you have a damaged data file, and it should be repaired. Check out DataTools by Committed Software. Jack des Bouillons Hobbs Herder Advertising On 7/1/08 8:26 AM, "Roger" <roger@...> wrote: > This doesn't bother 4D, but does it seem bother the web services. ********************************************************************** 4D Server v11 SQL has arrived! Buy it NOW at http://store.4ddepot.com 4th Dimension Internet Users Group (4D iNUG) FAQ: http://www.4d.com/support/faqnug.html Archive: http://dir.gmane.org/gmane.comp.lang.inug-4d.tech Unsub: mailto:4D_Tech-Unsubscribe@... Post: mailto:4d_tech@... Options: https://lists.4d.com/mailman/listinfo/4d_tech ********************************************************************** |
|
|
Re: Null ValesHi,
Maybe you have just added a field to the table.. In that case, the value is Null, because records have not been re-written, and they are set to default the first time 4D reads/writes them. You may try to do an apply to selection to force rewrite of records. APPLY TO SELECTION([Table];[Table]AnyField:=[Table]Field) Hope this will helps Amicalement, Jérôme ---------------------------------------------- Let the rhino keep its horn - Jul 7,2006 West Africa's version of the black rhino appears to be extinct, the World Conservation Union said on Friday. (Reuters) http://www.worldcommunitygrid.org/ : 4D DevTeam ---------------------------------------------- On Tue, Jul 1, 2008 at 5:26 PM, Roger <roger@...> wrote: > A third party has errors getting some data out of an application caused it > appears by null values. > I do not know how it has happend but there appear to be a few, not many, > long int fields which are empty. > This doesn't bother 4D, but does it seem bother the web services. > > I am trying to write a routine to check all fields on the table > But I am finding it difficult to find a way to check if a field is 'null' > Has anyone else had to do this? > > I looked through the archives Torsten Nilsson assinging <>Null:=char(0) > but can't see how to use this for a numeric values > > Thinking of trying next length of field on all numeric vales?! > > This is on windows with 4D2004 > > If anyone else had this problem and found a solution please let me know > Thanks > Roger > > ********************************************************************** > 4D Server v11 SQL has arrived! > Buy it NOW at http://store.4ddepot.com > > 4th Dimension Internet Users Group (4D iNUG) > FAQ: http://www.4d.com/support/faqnug.html > Archive: http://dir.gmane.org/gmane.comp.lang.inug-4d.tech > Unsub: mailto:4D_Tech-Unsubscribe@... > Post: mailto:4d_tech@... > Options: https://lists.4d.com/mailman/listinfo/4d_tech > ********************************************************************** > 4D Server v11 SQL has arrived! Buy it NOW at http://store.4ddepot.com 4th Dimension Internet Users Group (4D iNUG) FAQ: http://www.4d.com/support/faqnug.html Archive: http://dir.gmane.org/gmane.comp.lang.inug-4d.tech Unsub: mailto:4D_Tech-Unsubscribe@... Post: mailto:4d_tech@... Options: https://lists.4d.com/mailman/listinfo/4d_tech ********************************************************************** |
|
|
Re: Null ValesI will give that a try and let you know
Thanks Roger Ian MacPherson wrote: > Perhaps the number is a NaN (not a number) - can be caused by division by > zero and several other causes. > > I think these can be detected as being both greater than and less than zero. > > Cheers, > Ian > > >> A third party has errors getting some data out of an application caused >> it appears by null values. >> I do not know how it has happend but there appear to be a few, not many, >> long int fields which are empty. >> This doesn't bother 4D, but does it seem bother the web services. >> ********************************************************************** 4D Server v11 SQL has arrived! Buy it NOW at http://store.4ddepot.com 4th Dimension Internet Users Group (4D iNUG) FAQ: http://www.4d.com/support/faqnug.html Archive: http://dir.gmane.org/gmane.comp.lang.inug-4d.tech Unsub: mailto:4D_Tech-Unsubscribe@... Post: mailto:4d_tech@... Options: https://lists.4d.com/mailman/listinfo/4d_tech ********************************************************************** |
|
|
Re: Null ValesIs it only a problem with numerical fields?
Roger Jack des Bouillons wrote: > Oh yes it DOES bother 4D... > > A NULL value in a numeric field, for example, can screw up the use of SUM, > AVE, Subtotal, etc. > > Null values mean you have a damaged data file, and it should be repaired. > > Check out DataTools� by Committed Software. > > Jack des Bouillons > Hobbs Herder Advertising > > > > On 7/1/08 8:26 AM, "Roger" <roger@...> wrote: > > >> This doesn't bother 4D, but does it seem bother the web services. >> > > > > ********************************************************************** > 4D Server v11 SQL has arrived! > Buy it NOW at http://store.4ddepot.com > > 4th Dimension Internet Users Group (4D iNUG) > FAQ: http://www.4d.com/support/faqnug.html > Archive: http://dir.gmane.org/gmane.comp.lang.inug-4d.tech > Unsub: mailto:4D_Tech-Unsubscribe@... > Post: mailto:4d_tech@... > Options: https://lists.4d.com/mailman/listinfo/4d_tech > ********************************************************************** > > ********************************************************************** 4D Server v11 SQL has arrived! Buy it NOW at http://store.4ddepot.com 4th Dimension Internet Users Group (4D iNUG) FAQ: http://www.4d.com/support/faqnug.html Archive: http://dir.gmane.org/gmane.comp.lang.inug-4d.tech Unsub: mailto:4D_Tech-Unsubscribe@... Post: mailto:4d_tech@... Options: https://lists.4d.com/mailman/listinfo/4d_tech ********************************************************************** |
|
|
Re: Null ValesThat's the only type I've seen where there are problems...
Because it is possible to CREATE a NAN (null) in a numeric field by dividing by zero... Which is why, btw, that I wrap all calculations where division is used: [Table]NumbericField:=NUM_Divide(Value1;$Value2) Within NUM_Divide, I check to see if the second value passed is 0, and if it is, return 0 rather than running the calculation. Jack des Bouillons Hobbs Herder Advertising On 7/1/08 9:33 AM, "Roger" <roger@...> wrote: > > Is it only a problem with numerical fields? > > Roger > > > > Jack des Bouillons wrote: >> Oh yes it DOES bother 4D... >> >> A NULL value in a numeric field, for example, can screw up the use of SUM, >> AVE, Subtotal, etc. >> >> Null values mean you have a damaged data file, and it should be repaired. >> >> Check out DataTools by Committed Software. ********************************************************************** 4D Server v11 SQL has arrived! Buy it NOW at http://store.4ddepot.com 4th Dimension Internet Users Group (4D iNUG) FAQ: http://www.4d.com/support/faqnug.html Archive: http://dir.gmane.org/gmane.comp.lang.inug-4d.tech Unsub: mailto:4D_Tech-Unsubscribe@... Post: mailto:4d_tech@... Options: https://lists.4d.com/mailman/listinfo/4d_tech ********************************************************************** |
|
|
Re: Null Vales detectionYou suggestion didn't work ( > & < 0)
what did work was *Length*(*String*(fieldptr->))=0 Roger > > > Ian MacPherson wrote: >> Perhaps the number is a NaN (not a number) - can be caused by >> division by >> zero and several other causes. >> >> I think these can be detected as being both greater than and less >> than zero. >> >> Cheers, >> Ian ********************************************************************** 4D Server v11 SQL has arrived! Buy it NOW at http://store.4ddepot.com 4th Dimension Internet Users Group (4D iNUG) FAQ: http://www.4d.com/support/faqnug.html Archive: http://dir.gmane.org/gmane.comp.lang.inug-4d.tech Unsub: mailto:4D_Tech-Unsubscribe@... Post: mailto:4d_tech@... Options: https://lists.4d.com/mailman/listinfo/4d_tech ********************************************************************** |
|
|
Re: Null ValesI think that this is more likely than the divide by zero It is a field that was added to the database - although some time age. These could be old records. When I get the data fixed I can investigate some more I tried assigning each field to itself, but that didn't work. I have now written a routine to go through the records and this routine will allow me to get a list of records changes Thanks Roger jerome pupier wrote: > Hi, > > Maybe you have just added a field to the table.. In that case, the value is > Null, because records have not been re-written, and they are set to default > the first time 4D reads/writes them. You may try to do an apply to selection > to force rewrite of records. > > APPLY TO SELECTION([Table];[Table]AnyField:=[Table]Field) > > Hope this will helps > > > Amicalement, > > Jérôme > ---------------------------------------------- > Let the rhino keep its horn > - Jul 7,2006 > West Africa's version of the black rhino appears > to be extinct, the World Conservation Union > said on Friday. (Reuters) > > http://www.worldcommunitygrid.org/ : 4D DevTeam > > ---------------------------------------------- > > ********************************************************************** 4D Server v11 SQL has arrived! Buy it NOW at http://store.4ddepot.com 4th Dimension Internet Users Group (4D iNUG) FAQ: http://www.4d.com/support/faqnug.html Archive: http://dir.gmane.org/gmane.comp.lang.inug-4d.tech Unsub: mailto:4D_Tech-Unsubscribe@... Post: mailto:4d_tech@... Options: https://lists.4d.com/mailman/listinfo/4d_tech ********************************************************************** |
|
|
Re: Null Vales detectionI think it is
(X>0) & (x=0) On Tue, 01 Jul 2008 19:25:13 +0100, Roger wrote: > You suggestion didn't work ( > & < 0) > > what did work was *Length*(*String*(fieldptr->))=0 ********************************************************************** 4D Server v11 SQL has arrived! Buy it NOW at http://store.4ddepot.com 4th Dimension Internet Users Group (4D iNUG) FAQ: http://www.4d.com/support/faqnug.html Archive: http://dir.gmane.org/gmane.comp.lang.inug-4d.tech Unsub: mailto:4D_Tech-Unsubscribe@... Post: mailto:4d_tech@... Options: https://lists.4d.com/mailman/listinfo/4d_tech ********************************************************************** |
| Free Forum Powered by Nabble | Forum Help |