Skip to content
Advertisement

Using Where statement on comma seperated value in sqlite

I have sqlite database with table containing comma seperated fields like that:

Data Field containing:

Frank; 34 California street; 0123456789

FieldData Field containing:

Name; Address; Phone number

I want to make where query on only one data. For example:

Select * From Persons Where Name = 'Frank';

Please help!

Advertisement

Answer

but your model performance will be very bad! if you have to you can do something like this :

  Select * From Persons Where substr(field,1,instr(field,';')-1) = 'Frank';
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement