I am successfully using SQLite in my application. Requests are processed and tables are updated. I wanted to make a "filter" that would save me from duplicating records.
1. I created a checksum field - CRC.
2. Made this field CRC as primary key.
I specified a condition in the request if we are trying to add a line with duplicate information, then the record will not be added, but it does not work for me, what is my mistake. I tried different spellings of the CPC field with and without quotes with the table name but it does not help.
android.database.sqlite.SQLiteException: near "ON": syntax error (code 1): , while compiling:
INSERT INTO `Target` (`DTime`, `STime`, `CRC`) VALUES (1681747764109, 1681747759803, 'F0F44') ON CONFLICT(`CRC`) IGNORE
1. I created a checksum field - CRC.
2. Made this field CRC as primary key.
I specified a condition in the request if we are trying to add a line with duplicate information, then the record will not be added, but it does not work for me, what is my mistake. I tried different spellings of the CPC field with and without quotes with the table name but it does not help.
android.database.sqlite.SQLiteException: near "ON": syntax error (code 1): , while compiling:
INSERT INTO `Target` (`DTime`, `STime`, `CRC`) VALUES (1681747764109, 1681747759803, 'F0F44') ON CONFLICT(`CRC`) IGNORE