Question: I am doing git tag on a repo and getting below output.

**command**

```
def tagversion = sh(script:""" git tag --sort=v:refname """, returnStdout:true).trim()

```

**Output:-**

```
1.0
1.10.0
1.11.0
1.6
1.7
1.7.1

```

how can i add comma after each version?

**expected output**

```
1.0,
1.10.0,
1.11.0,
1.6,
1.7,
1.7.1

```

I have tried below code which works but add comma at last version as well and the entire list is showing as single string.

```
sh(script:""" git tag --sort=v:refname | tr '\n' ',' """, returnStdout:true).trim()

```

Answer: 
You could try a `delete` from a `select`

```
DELETE FROM products 
    WHERE brand IN (
    SELECT brand FROM products 
    WHERE brand LIKE 'Brand%'
);

```
Try deleting in batches. You might have a hang up somewhere with foreign keys, or triggers delaying the deletion.

```
delete top (10) product WHERE brand LIKE 'Brand%'
while @@rowcount > 0
    begin
    delete top (10) product WHERE brand LIKE 'Brand%'
    end

```