[GRASS5] 5.7: dbf driver and 'double' initialization
Markus Neteler
neteler at itc.it
Tue Sep 7 21:04:59 EDT 2004
On Tue, Sep 07, 2004 at 10:02:41AM +0200, Radim Blazek wrote:
> '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'?
For the simple example which I have sent the WHERE is not
required. But it was just a simple example to illustrate
the problem (it was working some time ago...).
Markus
PS: will try Glynn's patch later today
> 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