[GRASSLIST:10170] Re: Display labels as integer only

Michael Peterman michaelp at sjgeophysics.com
Mon Feb 6 13:34:11 EST 2006


Hi Dylan,
thanks for helping out. The first line works but the second one returns 
an error:
SQL parser error in statement: update table points set mx_int = MX

Error in db_execute_immediate()
....

--Mike


Dylan Beaudette wrote:

>On Thursday 02 February 2006 04:44 pm, Michael Peterman wrote:
>  
>
>>I have a vector points file and I have labels for each point derived
>>from a floating-point attribute.  Is it possible to display the labels
>>as integer only?  For instance I have labels like 253.230000 and all I
>>want is 253.  Or is there a way to convert the attribute to integer?
>>
>>Thanks
>>--Mike
>>    
>>
>
>echo "alter table xxx add column new_label int" | db.execute
>echo "update table set new_label = old_label" | db.execute
>
>i know that this works with MySQL as an attribute storage DB, not sure about 
>the DBF method- but is is worth a try!
>
>Cheers,
>
>  
>




More information about the grass-user mailing list