Question: ```
    public class MainActivity extends AppCompatActivity {
        private TaskDBHelper helper;
        private ListAdapter listAdapter;
        @Override
        public void onCreate(Bundle savedInstanceState) {

            private void updateUI(){
                helper = new TaskDBHelper(MainActivity.this);
                SQLiteDatabase sqlDB = helper.getReadableDatabase();
                Cursor cursor = sqlDB.query(TaskContract.TABLE,
                        new String[]{TaskContract.Columns._ID, TaskContract.Columns.TASK},
                        null, null, null, null, null);

                listAdapter = new SimpleCursorAdapter(
                        this,
                        R.layout.task_view,
                        cursor,
                        new String[]{TaskContract.Columns.TASK},
                        new int[]{R.id.taskTextView},
                        0
                );
                ListView listView = (ListView) findViewById(R.id.list);
                listView.setAdapter(listAdapter);
            }
        }
}

```

I keep getting a red mark on private void updateUI() where an error message that displays express expected (semicolon).

Answer: 
I would prefer to use the JSON\_REMOVE function (MySQL) :

```
UPDATE emp
SET emp.col = JSON_REMOVE(emp.col, '$.field1');

```

You can also add a WHERE clause :

```
WHERE emp.col LIKE '%val6%';

```

*References:* [MySQL JSON\_REMOVE](https://dev.mysql.com/doc/refman/5.7/en/json-modification-functions.html#function_json-remove) and [MySQL JSON path](https://dev.mysql.com/doc/refman/5.7/en/json-path-syntax.html)

*A blog post with examples:* [MySQL for your JSON](https://www.compose.com/articles/mysql-for-your-json/)

*And a note about json path in MySQL:* 

> 
> Propery names in path must be double quoted if the property identifier contains interpunction (spaces, special characters, meta characters) [bugs.mysql.com](https://bugs.mysql.com/bug.php?id=79051)
> 
> 
>
You can do it like this:

```
SELECT SUBSTRING(Field, 1, INSTR(Field, '"field1"')) + SUBSTRING(Field, INSTR(Field, '"field2"'), LENGTH(Field)) FROM @Temp

```

I don't know if this works but this is the idea. (Can't test ATM)

Here is the MsSQL equivalent (works, just tested!):

```
SELECT SUBSTRING(Field, 0, CHARINDEX('"field1"', Field)) + SUBSTRING(Field, CHARINDEX('"field2"', Field), LEN(Field)) FROM @Temp

```