# Modify value on existing data

**URL:** <https://community.influxdata.com/t/modify-value-on-existing-data/22092>\
**Category:** InfluxDB 2\
**Tags:** influxdb\
**Created:** [October 15, 2021, 1:20pm UTC](https://community.influxdata.com/t/modify-value-on-existing-data/22092 "2021-10-15T13:20:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elc3leb](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/elc3leb/32/8544_2.png) [@elc3leb](https://community.influxdata.com/u/elc3leb)\
**Post date:** [October 15, 2021, 1:20pm UTC](https://community.influxdata.com/t/modify-value-on-existing-data/22092/1 "2021-10-15T13:20:10Z")

</div>

Hello all,

I have data on a table, i would to modify fs=scratchrd by fs=srd :

```auto
> select * from RobinhoodScan where fs='scratchrd'
name: RobinhoodScan
time duration end_date entries fs start_date type
---- -------- -------- ------- -- ---------- ----
1584979947000000000 145 2020-03-23T16:12:27Z 1310685 scratchrd 2020-03-23T16:10:02Z scan
1585584790000000000 188 2020-03-30T16:13:10Z 1509206 scratchrd 2020-03-30T16:10:01Z scan
1586189581000000000 179 2020-04-06T16:13:01Z 1531971 scratchrd 2020-04-06T16:10:02Z scan
1586794396000000000 177 2020-04-13T16:13:16Z 1572394 scratchrd 2020-04-13T16:10:19Z scan
1588359835000000000 213 2020-05-01T19:03:55Z 1961957 scratchrd 2020-05-01T19:00:21Z scan
1591038869000000000 849 2020-06-01T19:14:29Z 6019245 scratchrd 2020-06-01T19:00:20Z scan
1593630817000000000 795 2020-07-01T19:13:37Z 6253540 scratchrd 2020-07-01T19:00:22Z scan
1596309185000000000 763 2020-08-01T19:13:05Z 5892312 scratchrd 2020-08-01T19:00:21Z scan

```

I tried this but i had error :

INSERT RobinhoodScan,fs=“test” 1631723617000000000’  
ERR: {“error”:“unable to parse ‘RobinhoodScan,fs=“test” 1631723617000000000’: invalid field format”}

---

<div class="post-metadata">

**Author:** ![Giovanni\_Luisotto](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/giovanni_luisotto/32/4017_2.png) [@Giovanni\_Luisotto](https://community.influxdata.com/u/Giovanni_Luisotto)\
**Post date:** [October 22, 2021, 8:25am UTC](https://community.influxdata.com/t/modify-value-on-existing-data/22092/2 "2021-10-22T08:25:33Z")

</div>

You can only update field values, to do so you must write a point with the same key (measurement, tags keys and value, time), once written it will override the previous data.

Your insert does not contain any field, you specified:  
`RobinhoodScan,fs=“test” 1631723617000000000`  
in this case the time is being interpreted as the field… as the field is mandatory (without a field a point is invalid as it contains nothing)

the proper format is:  
`Measurement,tagA=ValueA,TagB=ValueB FieldX=ValueX,FieldY=ValueY time`  
have a look at:

> **[InfluxDB line protocol tutorial | InfluxDB OSS 1.8 Documentation](https://docs.influxdata.com/influxdb/v1.8/write_protocols/line_protocol_tutorial/)**
>
> Tutorial for using InfluxDB line protocol.

also note that you don’t need to use double quotes around tag values, doing so will include the quotes in the actual value.

Here is how to solve this kind of issue:  
if the data you want to override is a **field** :

- just write a valid insert statement to update the value

if the data you want to override is a **tag** :

- download/save the data you want to change
- prepare the insert statement to write them back with the correct values
- DELETE the existing points
- INSERT the “new” points with correct values
