[sqlite] MATCH multiple

2012-08-09 Thread E. Timothy Uy
I recently switched a table to FTS4. Usually I query this table using the
IN operator, e.g.,

   SELECT * FROM Table WHERE term IN (a,b,c)

If I want to use MATCH, is my only option

   SELECT * FROM Table WHERE term MATCH 'a or b or c'

or is there an equivalent to IN?

Much obliged.

Respectfully,
Tim
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] insert two select count(*) problem

2012-08-09 Thread giris
80 ,select 
count(*) from db2 where db2.sco2>90;

Try parenthesizing each (sub)query
insert into mydb (co1,co2) (...),(...);


Could you clarify your use case for this query?

Thanks

HTH.


 From: YAN HONG YE 
To: "sqlite-users@sqlite.org"  
Sent: Wednesday, August 8, 2012 9:26 PM
Subject: [sqlite] insert two select count(*) problem
 
The sqlcmd is:
insert into mydb (co1,co2) select count(*) from db1 where db1.sco1>80 ,select 
count(*) from db2 where db2.sco2>90;
It doesn't work.  If one column, it can do,but when many column count(*), I 
don't know how to write the sql command.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to build sqlite4? Which branches are expected to build?

2012-08-09 Thread Richard Hipp
On Thu, Aug 9, 2012 at 10:06 AM, Klaas V  wrote:

> Richard Hipp wrote:
>
>
> >Copy Makefile.linux-gcc into Makefile.  Edit to suite your system.  Type
> "make"
>
> When a compiled version of sqlite4 will be released? We're on OSX Snow
> Leopard.
>

SQLite4 is a highly experimental and incomplete prototype.  No releases are
scheduled.


>
> Cordiali saluti/Vriendelijke groeten/Kind regards,
> Klaas V
>
> http://innocentisart.net
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to build sqlite4? Which branches are expected to build?

2012-08-09 Thread Klaas V
Richard Hipp wrote:


>Copy Makefile.linux-gcc into Makefile.  Edit to suite your system.  Type
"make"

When a compiled version of sqlite4 will be released? We're on OSX Snow Leopard.

Cordiali saluti/Vriendelijke groeten/Kind regards,
Klaas V

http://innocentisart.net
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] insert two select count(*) problem

2012-08-09 Thread Kit
2012/8/9 YAN HONG YE :
> The sqlcmd is:
> insert into mydb (co1,co2) select count(*) from db1 where db1.sco1>80 ,select 
> count(*) from db2 where db2.sco2>90;
> It doesn't work.  If one column, it can do,but when many column count(*), I 
> don't know how to write the sql command.

INSERT INTO mydb (co1, co2) SELECT
   (SELECT count(*) FROM db1 WHERE sco1>80),
   (SELECT count(*) FROM db2 WHERE sco2>90);
-- 
Kit
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users