Can you search SQL this way?

Phil (OmnisList) phil at pgpotter.co.uk
Fri Oct 22 14:59:58 UTC 2021


Sorry Das,

Thought you knew the rest...

so it would be something like this in raw SQL:

select * from table where field like '%string%'

or in Omnis

ilResults.$definefromsqlclass('table')
ilResults.$select('where field like '%string%'')
ilResults.$fetch(kfetchall)

I don't know lists in sqlite... presume would be binary, as it would not 
know the structure of an omnis list?

The postgres link Jeffrey pointed to, will explain 'like' well, and 
should still work for sqlite.

regards
Phil Potter
Based in Chester in the UK.

On 22/10/2021 15:45, Das Goravani wrote:
> I still don’t get it then.
>
> I have Omnis lists stored in SQLite and would like to query them the way we do in Omnis somehow.
>
> For example, does row 3 column 2 contain 4835 or does row 5 column 10 equal “Saturn”
>
>
>
>> On Oct 22, 2021, at 10:42 AM, Andy Hilton<andyh at totallybrilliant.com>  wrote:
>>
>> Das
>>
>> I think what Phil is meaning is :
>>
>> You would simply do a new sql search for whatever got you your list to start with, plus the extra addition of a like (note that depending on the database, ‘ilike’ can also be a case insensitive search) for your column search within that…..
>>
>> Andy Hilton
>> Totally Brilliant Software Inc
>> Phone (US) : (863) 409 4870
>> Phone (UK) : 0207 193 8582
>> Web :www.totallybrilliant.com  <http://www.totallybrilliant.com/>  
>> Helpdesk :http://totallybrilliant.kayako.com
>> Email :andyh at totallybrilliant.com
>>
>>> On Oct 22, 2021, at 10:36 AM, Phil (OmnisList) via omnisdev-en<omnisdev-en at lists.omnis-dev.com>  wrote:
>>>
>>> Hi Das,
>>>
>>> the string needs quotes...
>>> field like '%string%'
>>>
>>> A list?
>>> That is not a SQL object.
>>> What is that stored as? is it binary? so basically no chance of looking up on that.
>>>
>>> regards
>>> Phil Potter
>>> Based in Chester in the UK.
>>>
>>> On 22/10/2021 15:18, Das Goravani wrote:
>>>> Hello Listers,
>>>>
>>>> I’m wondering about two SQL searches or selects.
>>>>
>>>> One is if you have a large field full of text, and you want to search for a string inside it. Do you use LIKE %sring% ?
>>>>
>>>> And if you have a list, and you want to select on a value in a column, can you do that?
>>>>
>>>> That’s it.
>>>>
>>>> Thanks
>>>>
>>>> Das Goravani
>>>> _____________________________________________________________
>>>> Manage your list subscriptions athttp://lists.omnis-dev.com
>>>> Start a new message ->mailto:omnisdev-en at lists.omnis-dev.com   
>>> _____________________________________________________________
>>> Manage your list subscriptions athttp://lists.omnis-dev.com
>>> Start a new message ->mailto:omnisdev-en at lists.omnis-dev.com  
>> _____________________________________________________________
>> Manage your list subscriptions athttp://lists.omnis-dev.com
>> Start a new message ->mailto:omnisdev-en at lists.omnis-dev.com  
> _____________________________________________________________
> Manage your list subscriptions athttp://lists.omnis-dev.com
> Start a new message ->mailto:omnisdev-en at lists.omnis-dev.com  


More information about the omnisdev-en mailing list