Martin Jenkins-2 wrote:
> 
> fangles wrote:
>> I'm currently searching through all columns in a table to see if any
>> match
>> the search text and the query is rather cumbersome. Is there a way to use
>> a
>> loop to go through all available columns by some means? Maybe a loop by
>> querying the schema?
> 
> If you had a PK on that table and used a view to concatenate the columns
> 
> create view v as select pk, first||...||deleted as cols from addr;
> 
> you could reduce the select to
> 
> select * from addr where pk = (select pk from v where cols like srch);
> 
> Martin
> 
> 

PK? I'm sorry but I am not familiar with that term..
-- 
View this message in context: 
http://www.nabble.com/Search-all-collumns-with-LIKE-at-once-tf3251161.html#a9038981
Sent from the SQLite mailing list archive at Nabble.com.


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to