Question: I have a string containing a list and by that I mean :

```
String list = "[\"hello\",\"everyone\"]";

```

How can I transform that so I can read it as a `String[]`? My question might not be very clear but please understand English is not my native language thanks everyone.

Answer: 
```
select id, fruit, row_number() over (partition by fruit order by id) as running_total
from fruits
order by id

```

And then,

```
alter table Fruits add RUNNING_TOTAL int null

update fruits set running_total = subquery.running_total
from fruits
inner join (
 select id, row_number() over (partition by fruit order by id) as running_total
 from fruits
 )subquery on fruits.id = subquery.id

select * from fruits

```
In SQL Server 2008, you can use an updatable CTE:

```
with toupdate as (
      select f.*, row_number() over (partition by fruit order by id) as seqnum
      from fruits f
     )
update toupdate
    set running_total = seqnum;

```

I wouldn't really call such a column "running\_total". It seems more like a "sequence\_number" to me. "Running\_total" suggests a cumulative sum.