Re: [sqlite] SQLite ordering data from multiple columns

2011-12-02 Thread Simon Slavin
On 2 Dec 2011, at 9:03am, Kit wrote: > SELECT id, name FROM emp WHERE name LIKE '%emp%' > UNION ALL > SELECT id, descr FROM emp WHERE descr LIKE '%emp%'; I note very interesting names for the columns in this one. The question I was asking was whether the second column was called 'name' for

Re: [sqlite] SQLite ordering data from multiple columns

2011-12-02 Thread Kit
2011/12/2, colombus : > I want to search this database I will search Emp Name & Emp Desc for example > If Search EMP I will get results as EMP1 , this is EMP1, EMP2, this is EMP2. > I need to order this search in such a way that I get the Emp Name Column > first then I will get

[sqlite] SQLite ordering data from multiple columns

2011-12-01 Thread colombus
Hi I have a database with following structure NO | Emp Name | Emp Desc 1 EMP1 this is EMP1 2 EMP2this is EMP2 I want to search this database I will search Emp Name & Emp Desc for example If Search EMP I will get results as EMP1 , this is EMP1, EMP2, this