Re: ILLUSTRA and WebDataBlade
Posted in 1997
Topics: General Discussion
In article <3406B48A.775C@icor.fr>, Olivier FERNANDEZ <ofernandez@icor.fr> writes: > What's the procedure to test if an variable is a null ? > > (Ex: > <?MISQL SQL="Select var1, var2, var3 from .... where ...;"> > and I want to know if an return a $2 is null or blank) If you don't want to distinguish between null and blank, then set <?MIVAR name=MI_NULL><?/MIVAR> If you do care, then you have to set $MI_NULL to some value which cannot occur in the column you are testing, such as "xyz" for an integer column. Or (thinking about this more sensibly) you can add an extra column which tells you directly whether it is null: <?MISQL sql="select var1,var2,var3,(var2 is null) from ... where ...;"> Then $4 will be 't' if var2 is null. -- Peter Haworth pmh@edison.ioppublishing.com One fish, two fish, red fish, blue fish: Dr. Seuss Next fit, first fit, best fit, worst fit: Dr. Pfeiffer -- note at the end of a final exam submitted by a student of Dr Pfeiffer