[GRASS5] 5.7: dbf driver and 'double' initialization

Radim Blazek blazek at itc.it
Tue Sep 7 04:02:41 EDT 2004


'NULL' as default is OK, I think. 'IS NULL' is not supported 
by dbf driver. In this special case, why do you need to use 
'WHERE'? All values are 'NULL' so you can maybe just
'UPDATE dourokukan SET forward=50'?

Radim

On Tuesday 07 September 2004 04:55, Markus Neteler wrote:
> There seems to be a problem with the initialization of
> double (maybe also int) type in the DBF driver of 5.7:
>
> echo "ALTER TABLE dourokukan ADD COLUMN forward double" | db.execute
> echo "ALTER TABLE dourokukan ADD COLUMN backward double" | db.execute
> echo "ALTER TABLE dourokukan ADD COLUMN length double" | db.execute
>
> dbfdump dourokukan.dbf
>         cat label      forward             backward              length
>           1 s3m        (NULL)               (NULL)               (NULL)
>           3 e3.0m      (NULL)               (NULL)               (NULL)
>           5 e5.5m      (NULL)               (NULL)               (NULL)
>          13 s13.0      (NULL)               (NULL)               (NULL)
>          15 yes        (NULL)               (NULL)               (NULL)
>
> I assume that it should be set to zero (0).
> At least I don't know how to access these (NULL) values in
> a later SQL update :
>
> echo "UPDATE dourokukan SET forward=50 WHERE forward=0" | db.execute
> echo "SELECT * FROM dourokukan" | db.select
> cat|label|forward|backward|length
> 1|s3m|||
> 3|e3.0m|||
> 5|e5.5m|||
> 13|s13.0|||
> 15|yes|||
>
> Any advice is welcome,
>
>  Markus
>
>
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5




More information about the grass-dev mailing list