简体   繁体   English

在sqlite中对逗号分隔值使用Where语句

[英]Using Where statement on comma seperated value in sqlite

I have sqlite database with table containing comma seperated fields like that:我有一个带有包含逗号分隔字段的表的 sqlite 数据库,如下所示:

Data Field containing:数据字段包含:

Frank; 34 California street; 0123456789

FieldData Field containing: FieldData 字段包含:

Name; Address; Phone number

I want to make where query on only one data.我只想对一个数据进行 where 查询。 For example:例如:

Select * From Persons Where Name = 'Frank';

Please help!请帮忙!

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';

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用于标记化由逗号分隔的Key = Value对的列表的正则表达式,其中Value本身可能包含逗号 - Regular Expression for tokenizing the list of Key=Value pair seperated by comma(,), where Value itself may contain a comma(,) in it 使用LINQ从逗号分隔的数组中获得独特的价值 - Get distinct value from comma seperated array using LINQ Linq(EF)where子句,字符串逗号分隔 - Linq (EF) where clause with string comma seperated 从逗号分隔的字符串中按值过滤ObservableCollection - Filter ObservableCollection by value from Comma seperated string 如何将值os列表对象组合成一个用逗号分隔的字符串 - How to combine value os list object in to a single string seperated by comma 在C#中使用Regex检查可选的逗号分隔重复序列 - Using Regex in C# to check for optional comma seperated repeating sequence 使用FileHelpers解析带有法式重音的逗号分隔值文件 - Parsing a Comma-seperated values file with french accents in it using FileHelpers SQLite-在WHERE NOT EXISTS语句中使用无关联的多个值 - SQLite - Using Multiple values with no relation in WHERE NOT EXISTS statement 划分文本文件并将其显示到列表框中,列表框中的每一行将有30行文本文件,用逗号分隔 - Dividing a textfile and show it into listbox, where each line in the listbox will have 30 lines of textfile seperated by comma 将逗号分隔的字符串转换为json - Convert comma seperated string to json
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM