Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 To: mohammed qasem
  Where is mohammed qasem?
 amman
 Jordan
 mohammed qasem
 Tags
Subject: RE: .NULL.
Thread ID: 288987 Message ID: 289314 # Views: 34 # Ratings: 1
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Thursday, December 30, 2010 4:57:26 PM         
   


> hi all,
>
> i need your help to replace 0 with .NULL.
>
> i try as below not work,
> **f28 numaric type
>
> scan
>    if f28=.NULL.
>       replace f28 with 0
>    endif
> endscan
> 

> thanks

NULL is an unknown value, so it's not possible logically to compare it to anything with comparison operators like = or > or <=.
You can however assign NULL to variable or field.
address=NULL
STORE NULL TO address
It has no datatype. Try
? VARTYPE(NULL)

There's a special xbase language function you can use, ISNULL().
In SQL queries, you should use the Standard SQL test,
IS NULL
and
IS NOT NULL
.
Example
 ? ISNULL(Mytable.x)
 SELECT ..FROM Mytable  WHERE x IS NOT NULL 


-Anders

ENTIRE THREAD

.NULL. Posted by mohammed qasem @ 12/27/2010 3:40:33 PM
RE: .NULL. Posted by piyuhsh vaishnavswami @ 12/27/2010 3:44:12 PM
RE: .NULL. Posted by Samir H. @ 12/27/2010 3:53:20 PM
RE: .NULL. Posted by Anders Altberg @ 12/27/2010 4:40:40 PM
RE: .NULL. Posted by Christian Tabligan @ 12/28/2010 2:28:39 AM
RE: .NULL. Posted by Jignesh Parekh @ 12/28/2010 4:41:06 AM
RE: .NULL. Posted by Luis Maria Guayan @ 12/28/2010 11:25:42 PM
RE: .NULL. Posted by Jignesh Parekh @ 12/29/2010 8:16:03 AM
RE: .NULL. Posted by Jun Tangunan @ 12/30/2010 5:55:15 AM
RE: .NULL. Posted by Jignesh Parekh @ 12/30/2010 2:15:26 PM
RE: .NULL. Posted by Anders Altberg @ 12/30/2010 4:57:26 PM
RE: .NULL. Posted by mohammed qasem @ 12/30/2010 5:27:32 PM